form_for with url and params

30 views
Skip to first unread message

fugee ohu

unread,
Apr 4, 2017, 7:00:20 PM4/4/17
to Ruby on Rails: Talk
<%= form_for[@user, @address], :url => users_addresses_set_current_path(current_user.id, a.id) do |f| %>

this doesn't work 

Mugurel Chirica

unread,
Apr 22, 2017, 6:25:38 PM4/22/17
to rubyonra...@googlegroups.com
You can find more information for 'form_for' straight from the source:

http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html

Cheers

Manish Shah

unread,
Apr 23, 2017, 2:39:03 PM4/23/17
to Ruby on Rails: Talk
You can't have multiple objects for a form_for, it can only be one.

If you want to do a subobject, a fields-for is available.
Reply all
Reply to author
Forward
0 new messages