Removing record with Sequel nested_attributes and Forme subform #82
Replies: 1 comment
-
Google Group Date: Tue, 22 Aug 2017 13:57:41 -0700 On Tuesday, August 22, 2017 at 4:33:35 PM UTC-4, Jeremy Evans wrote:
With a bit more investigating, only the type option was required to get the <%== f.input :_delete, type: :checkbox %> Thanks for the feedback. Adam |
Beta Was this translation helpful? Give feedback.
-
Google Group Post: https://groups.google.com/g/ruby-forme/c/8ucxgwvzMNM
Google Group Date: Tue, 22 Aug 2017 09:37:26 -0700
Google Group Sender: [email protected]
I naively thought this would work:
<% f.subform :some_association do %>
<%== f.input :_delete %>
<% end %>
Which complained about "_delete" being an invalid field. Looking at the
source, passing an explicit type made the following code work:
<% f.subform :some_association do %>
<%== f.input :_delete, type: :checkbox, no_hidden: true, value: true %>
<% end %>
Would it make sense for Forme (or Sequel through forme_input?) allow a
nicer short-hand implementation where the first implementation would work?
Thanks,
Adam
Beta Was this translation helpful? Give feedback.
All reactions