Rails 3 link_to (:method => :delete) not working

前端 未结 6 2059
抹茶落季
抹茶落季 2020-11-30 08:13

I\'m having trouble with my verbs in Rails...

viewing a page for a resource (Dog) which has_many (Fleas). Embedded in dog\'s show.html.haml

6条回答
  •  感情败类
    2020-11-30 08:37

    Rails 3 uses unobtrusive javascript now. In Rails 2.3, erb would just shove all that messy javascript right into the link itself, in an onClick event. Now the javascript has been moved out of the link, and into external js files. Make sure you have this in your layout:

    <%= javascript_include_tag :all %>
    

    If you do have this, there might be deeper problems keeping your javascript from running, but this is the place to start. Let me know how it turns out.

提交回复
热议问题