diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-10-30 15:33:47 -0400 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2018-10-30 17:10:33 -0500 |
commit | 1f7bd2a1711afd71a8a7c5537c677a95fc8978bd (patch) | |
tree | 87c1308f37b9c862e8d88ef06d77c69049af11a4 /activejob/lib/active_job | |
parent | 6b23b7e78c60ecdff78170d1607350a4fafdb4db (diff) | |
download | rails-1f7bd2a1711afd71a8a7c5537c677a95fc8978bd.tar.gz rails-1f7bd2a1711afd71a8a7c5537c677a95fc8978bd.tar.bz2 rails-1f7bd2a1711afd71a8a7c5537c677a95fc8978bd.zip |
Restore HWIA support to AJ::Arguments.deserialize
Restore HashWithIndifferentAccess support to
ActiveJob::Arguments.deserialize.
Diffstat (limited to 'activejob/lib/active_job')
-rw-r--r-- | activejob/lib/active_job/arguments.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb index 8dcf588f35..31347194d2 100644 --- a/activejob/lib/active_job/arguments.rb +++ b/activejob/lib/active_job/arguments.rb @@ -147,7 +147,10 @@ module ActiveJob end def transform_symbol_keys(hash, symbol_keys) - hash.transform_keys do |key| + # NOTE: HashWithIndifferentAccess#transform_keys always + # returns stringified keys with indifferent access + # so we call #to_h here to ensure keys are symbolized. + hash.to_h.transform_keys do |key| if symbol_keys.include?(key) key.to_sym else |