X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5841813b82380c13ad4cfd2d652ce3bfeedff488..f7c2d56df7a90a65bea43e8e9a8336b42cc2b0d0:/app/controllers/issues_controller.rb?ds=inline diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f53a8dad5..fe900d627 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -27,12 +27,11 @@ class IssuesController < ApplicationController # If search if params[:search_by_user].present? @find_user = User.find_by(:display_name => params[:search_by_user]) - if @find_user - @issues = @issues.where(:reported_user => @find_user) - else - @issues = @issues.none - flash.now[:warning] = t(".user_not_found") - end + @issues = if @find_user + @issues.where(:reported_user => @find_user) + else + @issues.none + end end @issues = @issues.where(:status => params[:status]) if params[:status].present?