while setting up a simple Rails app, I met an issue i never had before: the destroy link will not work.
now, my code is:
<td><%= link_to 'Destroy', post, :confirm => 'Are you sure?', :method => :delete %></td>
rather basic, right?
When i click on delete, I get redirected to Show… quite puzzling.
My schema is:
t.string "title"
t.text "content"
t.string "category"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
What am I doing wrong??
You need to include the jQuery for Rails gem in your Gemfile
Then you have to run
bundle installand restart the server. This is because even if you have included in your layout.html.erb the jQuery framework you need the adapter for jQuery to use the unobstrusive scripting.