fix error on updating a repository

This commit is contained in:
Alexander Machehin 2015-05-21 15:15:26 +05:00
parent a03c1c35a5
commit 2e13918550
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Platforms::RepositoriesController < Platforms::BaseController
end
def update
authorize @repository = @platform.repositories.build(params[:repository])
authorize @repository
if @repository.update_attributes params[:repository].slice(:description, :synchronizing_publications, :publish_builds_only_from_branch).merge(publish_without_qa: (params[:repository][:publish_without_qa] || @repository.publish_without_qa))
flash[:notice] = I18n.t("flash.repository.updated")
redirect_to platform_repository_path(@platform, @repository)