tawheed
tawheed

Reputation: 5821

No route matches {:action=>"edit", :controller=>"users"}

For some reason my rails app is trying to access an action in my controller that I did not plan for which in return gives me a routing error. I am using the resource feature in rails to get all my routes.

enter image description here

This is what I have in my controller

enter image description here

Finally when I did rake routes I got the following routes, I am wondering why I am getting the routing error when it clearly shows me the right route in the console enter image description here

EDIT: Below is my routes.rb enter image description here

Upvotes: 2

Views: 1418

Answers (1)

Tran Tuan
Tran Tuan

Reputation: 21

I have a same error

You can check in file views/layout/_header.html.erb

My error is <%= link_to "Settings", edit_user_path(current_user) %>

but it have to <%= link_to "Settings", edit_user_path(current_user) %>

Upvotes: 2

Related Questions