This is the code I have in rails 3.1
<%= link_to \'All\',:action => \"bycategory\", :id => \'All\', :remote => true %>
I hav
You might want to put the :action => "bycategory" and :id => 'All' in a hash as
<%= link_to 'All', { :action => "bycategory", :id => 'All' }, :remote => true %>
This will generate the proper html attribute i.e. data-remote="true" otherwise it will simply treat everything following as an http request attribute. Your code will generate -
<a href="/bycategory?id=All&remote=true">All</a>
whereas using the hash will generate something similar to
<a data-remote="true" href="/bycategory/All">All</a>
I had the same problem with Rails 3.1.3 and I cured it with rake assets:precompile,but ensure you have in application.js "//= require jquery_ujs" instead of "//= require jquery",this was the main problem and I spent at least 12 hours before I decided do it this way!Terrible!