Hashes defined in matchers do not save properly after the first time
When opening a class that contains a matcher that has a hash in a value field, the class can not be properly submitted. The hash is changed from json format into a normal ruby hash (valid as far as I can see). Saving of the class then fails with a 'JSON::ParserError: 795: unexpected token' error in the production.log.
Updated by Dominic Cleal over 7 years ago
- Category set to Parameters
- translation missing: en.field_release set to 161
Confirmed, this is a regression in 1.12.0. Rails now only calls value_before_type_cast (which contains the user YAML/JSON input) when rendering the tag if "value_came_from_user?" returns true too: https://github.com/rails/rails/commit/3e74db6
This causes Rails to use #value to render the tag which contains the Ruby hash.