I have a rails application with the following code in one of my views:
<% if @present.taken == false %>
<%= link_to "I want to buy this present", :confirm => 'Are you sure you want to buy this present?', :action => "taken_toggle", :id => @present.id %>
<% end %>
However, I do not see the javascript dialog showing - it seems that to skip this bit (the action call is valid).
My application layout has the following:
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
So, I think I have the necessary javascript loaded.
Any ideas why this is not working?
source
share