Extract concern to handle investments filters
We were defining the same filters in three different controllers. We were also adding a method in the ApplicationController which only made sense in the same three controllers.
This commit is contained in:
@@ -111,14 +111,6 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
end
|
||||
|
||||
def set_default_budget_filter
|
||||
if @budget&.balloting? || @budget&.publishing_prices?
|
||||
params[:filter] ||= "selected"
|
||||
elsif @budget&.finished?
|
||||
params[:filter] ||= "winners"
|
||||
end
|
||||
end
|
||||
|
||||
def current_budget
|
||||
Budget.current
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user