Skip to content

SimpleForm Nested Attributes #16

@rmaspero

Description

@rmaspero

Describe the bug
When using creating nested fields in simple form the id of the generated field does not match that of the input on the trix-editor e.g. model1_model2_attributes_field for the simple form id and model1_model2_field for the trip-editor input value

To Reproduce
Steps to reproduce the behavior:

  1. Use accepts nested attributes for model 2 on model 1
  2. Use simple forms simple_fields_for to nest the attributes
  3. Put the trix field type on one of the nested fields
  4. Fill in form
  5. No value is added to the hidden input
  6. Try submitting the form and nothing is passed through

Expected behavior
The input value on trix-editor element should match the ID of input. There by updating the input and then passing through values.

Actual behavior
ID and input value do not match

Environment (please complete the following information):

  • Rails version: 5.2
  • trix-rails version: 2.0.0
  • Browser: Safari 12.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions