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: Click here
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 %>
Click here
So, why does the first example not working in Rails 3 anymore? And how
should i do it correctly in Rails 3?
Greets, Gerrit