1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Use params slice and uniq constant in admin::filter_helper

This commit is contained in:
Matt Jankowski 2024-06-14 12:11:34 -04:00
parent e29478ae69
commit 169e524f46

View file

@ -15,7 +15,7 @@ module Admin::FilterHelper
AnnouncementFilter::KEYS, AnnouncementFilter::KEYS,
Admin::ActionLogFilter::KEYS, Admin::ActionLogFilter::KEYS,
Admin::StatusFilter::KEYS, Admin::StatusFilter::KEYS,
].flatten.freeze ].flatten.uniq.freeze
def filter_link_to(text, link_to_params, link_class_params = link_to_params) def filter_link_to(text, link_to_params, link_class_params = link_to_params)
new_url = filtered_url_for(link_to_params) new_url = filtered_url_for(link_to_params)
@ -48,6 +48,6 @@ module Admin::FilterHelper
end end
def controller_request_params def controller_request_params
params.permit(FILTERS) params.slice(FILTERS).permit(FILTERS)
end end
end end