Commit 801fc90c authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Refactor to use updated params in finder

parent 263849f6
...@@ -188,21 +188,6 @@ module ApplicationHelper ...@@ -188,21 +188,6 @@ module ApplicationHelper
"#{request.path}?#{params.to_param}" "#{request.path}?#{params.to_param}"
end end
def filter_bar_params
{
milestone_title: params[:milestone_title],
assignee_id: params[:assignee_id],
author_id: params[:author_id],
search: params[:search],
label_name: params[:label_name],
my_reaction_emoji: params[:my_reaction_emoji]
}
end
def has_filter_bar_param?
filter_bar_params.values.any? { |v| v.present? }
end
def outdated_browser? def outdated_browser?
browser.ie? && browser.version.to_i < 10 browser.ie? && browser.version.to_i < 10
end end
......
...@@ -362,6 +362,10 @@ module IssuablesHelper ...@@ -362,6 +362,10 @@ module IssuablesHelper
end end
end end
def has_filter_bar_param?
finder.class.scalar_params.any? { |p| params[p].present? }
end
private private
def sidebar_gutter_collapsed? def sidebar_gutter_collapsed?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment