On Aug 1, 2007, at 3:38 PM, Joe Noon wrote:> if i want a link to book_url(@book), but i want to pass an additional
> param, how to i do that?
>
> i want it to result in something like http://localhost/books/1?foo=bar
>
> this works, but seems hackish:
>
> url_for(:controller => book_path(@book), :foo => "bar",
:only_path =>
> false)
book_url(:id => @book, :foo => ''bar'')
You have to use the hash format even for the :id when you want to add
other parameters.
-Rob
Rob Biedenharn http://agileconsultingllc.com
Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---