Check your project routes by giving the command rake routes
from the console
, this command will return a list with 4 columns.
- The 4 column is the action of your controller that should be executed (e.g.:
show).
- 3 is the route as shown in the address bar .
- A 2 is the sending method used by the action.
- 1 is the shortcut to use
redirecting.
Find the action you want to use in your controller in the 4 column and put it in place of the "edit_password_form/" + @user.id.to_s which appears in the first column + path if you need to specify an object pass it in the function (eg: edit_password_path(@usuario)
).
If the first column is empty you should look at its method, it will be the same path as the top row, but you need to specify the method with the method attribute (eg: method: :put
)
Otherwise, you should add the route to your file routes.rb
(study about)
Edit your question by adding more details. You’re using a Gem (like Devise, for example) for user authentication or created everything "on the same arm"? There is a
usuarios_controller.rb
created by you? How is yourroutes.rb
hitherto?– user7261