From f01fce7f4683e06e83d3f91d38ca5b749e27e7ec Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Thu, 21 Jul 2016 18:11:53 -0500 Subject: Refactor spam validation to a concern that can be easily reused and improve legibility in `SpamCheckService` --- app/controllers/projects/issues_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers') 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 -- cgit v1.2.1