diff --git a/app/views/alchemy/admin/resources/_filter.html.erb b/app/views/alchemy/admin/resources/_filter.html.erb index 520df6d12f..3f03ddacc2 100644 --- a/app/views/alchemy/admin/resources/_filter.html.erb +++ b/app/views/alchemy/admin/resources/_filter.html.erb @@ -3,7 +3,7 @@ <%= select_tag( filter.name, options_for_select( - filter.options_for_select, params[:filter].try(:[], filter.name) + filter.options_for_select, search_filter_params.dig(:filter, filter.name) ), include_blank: Alchemy.t(:all, scope: ['resources', resource_name, 'filters']), data: { remote: !!request.xhr? }, diff --git a/app/views/alchemy/admin/resources/_per_page_select.html.erb b/app/views/alchemy/admin/resources/_per_page_select.html.erb index 9786499391..c6911f6e05 100644 --- a/app/views/alchemy/admin/resources/_per_page_select.html.erb +++ b/app/views/alchemy/admin/resources/_per_page_select.html.erb @@ -1,6 +1,6 @@ <%= form_tag url_for, method: :get, class: 'per-page-select-form' do |f| %> <% search_filter_params.reject { |k, _| k == 'page' || k == 'per_page' }.each do |key, value| %> - <% if value.is_a? Hash %> + <% if value.is_a? ActionController::Parameters %> <% value.each do |k, v| %> <%= hidden_field_tag "#{key}[#{k}]", v, id: nil %> <% end %>