form_for with url and params

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

form_for with url and params

fugee ohu
<%= form_for[@user, @address], :url => users_addresses_set_current_path(current_user.id, a.id) do |f| %>

this doesn't work 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ca248d2f-693b-40fe-8005-3bff169c07da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: form_for with url and params

Mugurel Chirica
You can find more information for 'form_for' straight from the source:

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

Cheers

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8EbS%3Dk9RW3SG3%2Br7wKi7GmhNxRQNPrbye48oWuMUyiHvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: form_for with url and params

mrmanishs-2
In reply to this post by fugee ohu
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.

On Tuesday, April 4, 2017 at 7:00:20 PM UTC-4, fugee ohu wrote:
<%= form_for[@user, @address], :url => users_addresses_set_current_path(<a href="http://current_user.id" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcurrent_user.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHln86yVm6ftJ3tJurAoqyAu6JNQA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcurrent_user.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHln86yVm6ftJ3tJurAoqyAu6JNQA&#39;;return true;">current_user.id, <a href="http://a.id" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fa.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF8aITsLgn5Pwl45BEunC9KSwxxPQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fa.id\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF8aITsLgn5Pwl45BEunC9KSwxxPQ&#39;;return true;">a.id) do |f| %>

this doesn't work 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/67d318aa-9693-494a-a901-96debb0e4b6a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.