How could you do what’s covered in RyanB’s Railscast on editing multiple records individually, using Formtastic? Formtastic doesn’t use form_tag, which RyanB’s method relies on.
How could you do what’s covered in RyanB’s Railscast on editing multiple records individually,
Share
The
semantic_form_foris just a wrapper aroundform_forso you can use the same parameters. Here is a formtastic version of Ryan Bates’ screencastviews/products/edit_individual.html.erbviews/products/index.html.erbPlease note that you can use the
form_forhelpers as well informtastic.Update
If you like to use nested attributes as well it should work out of the box, using fields_for on the form partial. Lets stick with the railscast example and say that:
product.rb
You can edit the comments on the _fields.html.erb of the products like:
And make sure you have a fields partial in your comments views.