diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-07-21 18:11:53 -0500 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-07-26 19:29:16 -0500 |
commit | f01fce7f4683e06e83d3f91d38ca5b749e27e7ec (patch) | |
tree | 4e43e365de7cc27cc7c22458fa0a8d079e35add6 /app/controllers | |
parent | 8f04cf0eadbcde7fc5d1c970741e30ca8b97967d (diff) | |
download | gitlab-ce-f01fce7f4683e06e83d3f91d38ca5b749e27e7ec.tar.gz |
Refactor spam validation to a concern that can be easily reused and improve legibility in `SpamCheckService`akismet-ui-check
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index f11e3fac959..d169b408b41 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -79,11 +79,11 @@ class Projects::IssuesController < Projects::ApplicationController end def create - @issue = Issues::CreateService.new(project, current_user, issue_params.merge({ request: request })).execute + @issue = Issues::CreateService.new(project, current_user, issue_params.merge(request: request)).execute respond_to do |format| format.html do - if @issue.errors.empty? && @issue.valid? + if @issue.valid? redirect_to issue_path(@issue) else render :new |