Project

General

Profile

« Previous | Next » 

Revision d477552c

Added by Daniel Lobato Garcia almost 6 years ago

Fixes #23382 - Hashes in arrays are shown properly on ENC

When defining smart class parameter values with type YAML and submitted
in GUI an Ruby error message gets prepended for each array entry.

Defining an YAML-Array like:

---
- name: foo
mount_point: /bar
- name: john
mount_point: /doe

is shown on the ENC as:

- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
name: foo
mount_point: "/bar"
- !ruby/hash:ActiveSupport::HashWithIndifferentAccess
name: john
mount_point: "/doe"

In order to avoid parsing the whole YAML or monkeypatching
HashWithIndifferentAccess the easiest workaround is to convert to
JSON then parse back to YAML

  • added
  • modified
  • copied
  • renamed
  • deleted