Hey community,
since some day i dive into Rails and started with the basics for
developing applications. Yesterday i spend a lot of time for how to
create a remote'able link_to with parameters. What orginally should
worked is this code-sample:
<%= link_to "Click here", index_path, :remote => true, :picture =>
"12" %> which creates the following html-code: <a href="/index" data-
remote="true" picture="21">Click here</a>
My controller receive's the Ajax Get-Request but without any parameter
(checked my logfiles too).
After some testing i found a solution for submitting paramters on a
remote call:
<%= link_to "Click here", { :controller => :index, :action
=> :index, :picture => 21 }, :remote => true %>
<a data-remote="true" href="/times?picture=21">Click here</a>
So, why does the first example not working in Rails 3 anymore? And how
should i do it correctly in Rails 3?
Greets, Gerrit
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.