I have Devise gem for user authentication.
Basically, I want to override registrations_controller.rb in Devise gem locally. The code in gem:
class Devise::RegistrationsController < DeviseController
...
def update
...(need to override)
end
end
I want to redirect user to other page if particular attribute in edit_form is selected.
I would advise against overriding that method. Instead, take a look at the Wiki page about custom redirects after a profile edit. It explains to override this method:
You could return different paths based on your attribute, so for example