Rails 3.1 link_to remote => true renders HTML instead of JS, the same code works in some cases

后端 未结 2 1126
清歌不尽
清歌不尽 2021-01-16 08:29

This is the code I have in rails 3.1

<%= link_to \'All\',:action => \"bycategory\", :id => \'All\', :remote => true %>

I hav

2条回答
  •  说谎
    说谎 (楼主)
    2021-01-16 09:03

    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!

提交回复
热议问题