mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
Remove #with_indifferent_access methods.
Tests pass without them despite using both symbol and string keys. Maybe I’m missing something here. Let’s see what travis-ci says for the older Rubies/Rails.
This commit is contained in:
parent
dd2679b6ab
commit
3fdfa1eda7
1 changed files with 1 additions and 5 deletions
|
@ -83,9 +83,6 @@ module Ransack
|
|||
@options = extract_options_and_mutate_args!(args)
|
||||
@hide_indicator = @options.delete :hide_indicator
|
||||
@default_order = @options.delete :default_order
|
||||
if Hash === @default_order
|
||||
@default_order = @default_order.with_indifferent_access
|
||||
end
|
||||
@sort_params = build_sort(sort_fields)
|
||||
@sort_params = @sort_params.first if @sort_params.size == 1
|
||||
end
|
||||
|
@ -142,8 +139,7 @@ module Ransack
|
|||
end
|
||||
|
||||
def search_params
|
||||
@params[@search.context.search_key].presence ||
|
||||
{}.with_indifferent_access
|
||||
@params[@search.context.search_key].presence || {}
|
||||
end
|
||||
|
||||
def build_sort(fields)
|
||||
|
|
Loading…
Reference in a new issue