Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore HWIA support to AJ::Arguments.deserialize #34351

Merged
merged 1 commit into from
Oct 30, 2018

Conversation

gmcgibbon
Copy link
Member

@gmcgibbon gmcgibbon commented Oct 30, 2018

Summary

Closes #34262.

Restores HashWithIndifferentAccess support to ActiveJob::Arguments.deserialize.

@rails-bot rails-bot bot added the activejob label Oct 30, 2018
@gmcgibbon
Copy link
Member Author

r? @rafaelfranca

@@ -147,7 +147,9 @@ def serialize_hash_key(key)
end

def transform_symbol_keys(hash, symbol_keys)
hash.transform_keys do |key|
# NOTE: #transform_keys doesn't play well with
# HashWithIndifferentAccess hashes so we call #to_h here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be specific about the issue here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will rewrite my comment.

assert_equal(
{ a: 1 },
ActiveJob::Arguments.deserialize([indifferent_access_symbol_key]).first
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Restore HashWithIndifferentAccess support to
ActiveJob::Arguments.deserialize.
@jeremy jeremy merged commit 1f7bd2a into rails:master Oct 30, 2018
@gmcgibbon gmcgibbon deleted the active_job_hwia_support branch November 16, 2018 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants