Apply Rails/SafeNavigation rubocop rule

This commit is contained in:
Javi Martín
2019-06-22 23:00:33 +02:00
parent daa86ca3fc
commit 9fe8c47528
39 changed files with 52 additions and 53 deletions

View File

@@ -110,9 +110,9 @@ class ApplicationController < ActionController::Base
end
def set_default_budget_filter
if @budget.try(:balloting?) || @budget.try(:publishing_prices?)
if @budget&.balloting? || @budget&.publishing_prices?
params[:filter] ||= "selected"
elsif @budget.try(:finished?)
elsif @budget&.finished?
params[:filter] ||= "winners"
end
end