tomasc / simple_form_attachments

A Rails engine which takes care of creating Attachments using the jQuery File Upload plugin.
MIT License
2 stars 2 forks source link

Form input ignores collection attribute #12

Open jakubstraka opened 7 years ago

jakubstraka commented 7 years ago

sorted method works only on decorated/presented objects. But doesn't work as a collection attribute in form (where I'm not able to have decorated object).

= form.input :images, as: :attachment, collection: form.object.images.sorted

However when skipping as: :attachment I can see that sorted works. So it seems as a bug with simple form custom input?

tomasc commented 7 years ago

@jakubstraka PR with a fix welcome :-)