diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-11-17 14:33:35 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-11-17 14:33:35 +0100 |
commit | 7b014338ca94caf4677a035f28469945e6a80100 (patch) | |
tree | c442bdae95edb35d14551ca04052227bdb840511 /app/controllers/projects_controller.rb | |
parent | bb8b6f38e7fef0afd41088d54d9dda41695ec1c7 (diff) | |
parent | 1c040b3f0a3ecb18fc8fdea3cf99b70edad8d873 (diff) | |
download | gitlab-ce-7b014338ca94caf4677a035f28469945e6a80100.tar.gz |
Merge branch 'master' into contributor-graph-by-emailcontributor-graph-by-email
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r-- | app/controllers/projects_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 05c7d3de8bc..23453195e85 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -1,7 +1,7 @@ class ProjectsController < ApplicationController include ExtractsPath - prepend_before_filter :render_go_import, only: [:show] + prepend_before_action :render_go_import, only: [:show] skip_before_action :authenticate_user!, only: [:show, :activity] before_action :project, except: [:new, :create] before_action :repository, except: [:new, :create] @@ -72,8 +72,7 @@ class ProjectsController < ApplicationController def remove_fork return access_denied! unless can?(current_user, :remove_fork_project, @project) - if @project.forked? - @project.forked_project_link.destroy + if @project.unlink_fork flash[:notice] = 'The fork relationship has been removed.' end end @@ -213,7 +212,8 @@ class ProjectsController < ApplicationController params.require(:project).permit( :name, :path, :description, :issues_tracker, :tag_list, :issues_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, :default_branch, - :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id, :avatar + :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id, :avatar, + :builds_enabled ) end @@ -242,7 +242,7 @@ class ProjectsController < ApplicationController project.repository_exists? && !project.empty_repo? end - # Override get_id from ExtractsPath, which returns the branch and file path + # Override get_id from ExtractsPath, which returns the branch and file path # for the blob/tree, which in this case is just the root of the default branch. def get_id project.repository.root_ref |