diff options
author | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-06 16:55:44 +0300 |
---|---|---|
committer | Jeroen Nijhof <jeroen@jeroennijhof.nl> | 2016-01-06 16:55:44 +0300 |
commit | 9b28220f8874c7ab342286e74f0b21895a2dd777 (patch) | |
tree | 0b2ec2d97a95796893778623adabb975e0224b64 /app/controllers/projects/triggers_controller.rb | |
parent | d4690af8bc283c402e49cb8b3056c7de9d57e886 (diff) | |
parent | 8b39b8cd54bb73b485ee6ea7fc5d3bbfbe07cd5d (diff) |
Merge gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'app/controllers/projects/triggers_controller.rb')
-rw-r--r-- | app/controllers/projects/triggers_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/projects/triggers_controller.rb b/app/controllers/projects/triggers_controller.rb index 782ebd01b05..30adfad1daa 100644 --- a/app/controllers/projects/triggers_controller.rb +++ b/app/controllers/projects/triggers_controller.rb @@ -1,22 +1,21 @@ class Projects::TriggersController < Projects::ApplicationController - before_action :ci_project before_action :authorize_admin_project! layout 'project_settings' def index - @triggers = @ci_project.triggers + @triggers = project.triggers @trigger = Ci::Trigger.new end def create - @trigger = @ci_project.triggers.new + @trigger = project.triggers.new @trigger.save if @trigger.valid? redirect_to namespace_project_triggers_path(@project.namespace, @project) else - @triggers = @ci_project.triggers.select(&:persisted?) + @triggers = project.triggers.select(&:persisted?) render :index end end @@ -30,6 +29,6 @@ class Projects::TriggersController < Projects::ApplicationController private def trigger - @trigger ||= @ci_project.triggers.find(params[:id]) + @trigger ||= project.triggers.find(params[:id]) end end |