diff options
author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-21 10:29:52 +0200 |
---|---|---|
committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-09-21 11:43:05 +0200 |
commit | ad47993ac46cef672600f2384ee5fa2e661ec8be (patch) | |
tree | 07769b4efeb4c18762b3ed0e705179a5423926c1 /app/controllers/projects/tags_controller.rb | |
parent | fda61a047ffb9b04bc4dd38e897088fde17fb3c1 (diff) | |
download | gitlab-ce-ad47993ac46cef672600f2384ee5fa2e661ec8be.tar.gz |
Factor error and success methods from services.
Diffstat (limited to 'app/controllers/projects/tags_controller.rb')
-rw-r--r-- | app/controllers/projects/tags_controller.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/projects/tags_controller.rb b/app/controllers/projects/tags_controller.rb index c80ad8355d5..537c94bda20 100644 --- a/app/controllers/projects/tags_controller.rb +++ b/app/controllers/projects/tags_controller.rb @@ -13,9 +13,8 @@ class Projects::TagsController < Projects::ApplicationController end def create - result = CreateTagService.new.execute(@project, params[:tag_name], - params[:ref], params[:message], - current_user) + result = CreateTagService.new(@project, current_user). + execute(params[:tag_name], params[:ref], params[:message]) if result[:status] == :success @tag = result[:tag] redirect_to project_tags_path(@project) |