I just noticed that all the various delete links in my application now just go to show pages. This application began as rails 2.3.8, it is now rails 3.2.17
Examples of the rails code:
Controllers,
def destroy
@group = Group.find(params[:id])
@group.destroy
respond_to do |format|
format.html { redirect_to(groups_url) }
format.xml { head :ok }
end
end
And,
def destroy
@link = Link.find(params[:id])
@link.destroy
respond_to do |format|
format.html { redirect_to(links_url) }
end
end
Which generates:
HTML,
<a rel="nofollow" data-method="delete" data-confirm="Sure?" href="/groups/35">
x
</a>
And,
<a rel="nofollow" data-method="delete" data-confirm="Sure?" href="/links/8">
x
</a>
I noticed that I had,
= javascript_include_tag "application"
In my application layout template and I tried updating that to be,
= javascript_include_tag :defaults
But it didn't help with this issue, still going to show page and not deleting and worse, doing this stopped all my other javascript from working! Such as leaving user on the search field automatically, the date-picker calendar, etc.
My application.js file has:
//= require jquery-1.7.2.min
//= require jquery-ui-1.8.22.custom.min
//= require default_on_first_input_field
//= require row_shading
//= require long_or_short_details
//= require sortable_hook
//= require date-picker
//= require_self