Bug #15718
closed
Hashes defined in matchers do not save properly after the first time
Added by Gerard van Dijnsen about 8 years ago.
Updated about 6 years ago.
Description
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.
- 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.
- Status changed from New to Assigned
- Assignee set to Tomer Brisker
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3658 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF