I use devise for authentication, all it’s fine but I want to put the before filter to edit user action which is built in devise and have a problem with it cause it’s no controller for it. Anybody knows how to do it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can alter the controller that is used by Devise by specifying it in your
config/routes.rbfile:Then you would create a
UsersControllerin your application that inherits from theDevise::UsersControllerand define abefore_filterat the beginning of this controller:You don’t need to define the actions in this controller unless you want to completely override them.