Rubocop fixes
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Feb 2018 08:23:25 +0000 (16:23 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Feb 2018 08:23:25 +0000 (16:23 +0800)
app/controllers/issues_controller.rb

index 90fd0306dc2d7523326554e430775046b779e471..181d176abc87e18f6e44ef6c305e63ab069bf5df 100644 (file)
@@ -30,13 +30,9 @@ class IssuesController < ApplicationController
       end
     end
 
-    if params[:status] && params[:status][0].present?
-      @issues = @issues.where(:status => params[:status][0])
-    end
+    @issues = @issues.where(:status => params[:status][0]) if params[:status] && params[:status][0].present?
 
-    if params[:issue_type] && params[:issue_type][0].present?
-      @issues = @issues.where(:reportable_type => params[:issue_type][0])
-    end
+    @issues = @issues.where(:reportable_type => params[:issue_type][0]) if params[:issue_type] && params[:issue_type][0].present?
 
     if params[:last_updated_by] && params[:last_updated_by][0].present?
       last_updated_by = params[:last_updated_by][0].to_s == "nil" ? nil : params[:last_updated_by][0].to_i