trix icon indicating copy to clipboard operation
trix copied to clipboard

SimpleForm Nested Attributes

Open rmaspero opened this issue 6 years ago • 0 comments

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

rmaspero avatar Mar 30 '19 16:03 rmaspero