Michael Toth


50 Experience
0 Lessons Completed
0 Questions Solved


Posted in Why is a GET verb being used?

I have the following error occurring after selecting a link.

ActionController::RoutingError (No route matches [GET] "/admins/delete_user"):

But the link is constructed as follows:

<td><%= link_to "Delete", "/admins/delete_user?id=#{u.id}", :method=>"post",
            :confirm=>"Are you sure?", :remote=>:true, :class=>"alert" %>

Why is the controller trying to use GET? Any ideas?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.