Skip to content
This repository was archived by the owner on Aug 17, 2017. It is now read-only.

Conversation

@ptoomey3
Copy link

@ptoomey3 ptoomey3 commented Oct 8, 2013

Current behavior of fetch is incorrect if the default value passed is a hash. This occurs because of the use of convert_hashes_to_parameters. If the value passed to convert_hashes_to_parameters is a hash, this value will be converted to a Parameters hash and stored at self[key]. This seems inconsistent with how default values works with regular hashes.

Also, looks like this file had a bunch of trailing whitespace...if you want a clean blame log I can resubmit the PR without the whitespace cleanup.

@ptoomey3
Copy link
Author

ptoomey3 commented Oct 8, 2013

It loos like this issue may be accidentally handled by rails/rails#11695. That PR was originally referenced from #156. It looks like the proposed PR fixes both the Exception issue as well as the convert_hashes_to_parameters issue. I can submit a reasonable unit test once that PR is merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant