You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think 1.6.0 broke multiparameter attributes like dates. Given a form like:
<%= f.date_select :start_time_gteq %>
...where start_time is a DateTime, it looks like collapse_multiparameter_attributes tries to modify a hash in an iteration. I believe this was introduced by ee571fe.
Here's the relevant stacktrace lines:
active_support/hash_with_indifferent_access.rb:97:in `[]='
regular_writer(convert_key(key), convert_value(value, for: :assignment))
active_support/hash_with_indifferent_access.rb:97:in `[]='
regular_writer(convert_key(key), convert_value(value, for: :assignment))
ransack/search.rb:167:in `block in collapse_multiparameter_attributes!'
attrs[real_attribute] ||= []
ransack/search.rb:156:in `each_key'
attrs.each_key do |k|
ransack/search.rb:156:in `collapse_multiparameter_attributes!'
attrs.each_key do |k|
ransack/search.rb:47:in `build'
collapse_multiparameter_attributes!(params).each do |key, value|
ransack/search.rb:39:in `initialize'
build(params.with_indifferent_access)
The text was updated successfully, but these errors were encountered:
nateberkopec
changed the title
1.6.2: can't add a new key into hash during iteration
1.6.x: can't add a new key into hash during iteration
Jan 20, 2015
I think 1.6.0 broke multiparameter attributes like dates. Given a form like:
...where start_time is a DateTime, it looks like collapse_multiparameter_attributes tries to modify a hash in an iteration. I believe this was introduced by ee571fe.
Here's the relevant stacktrace lines:
The text was updated successfully, but these errors were encountered: