I am using Devise 1.5.3.
I inherited Devise::RegistrationsController for customizing my own path for after_update:
class RegistrationsController < Devise::RegistrationsController
protected
def after_update_path_for(resource)
some_path
end
end
After that Rails tries to find views for registration actions (new, create, etc) in views/registrations/ but no in /views/devise/registrations
Sure, I can copy all from /views/devise/registrations to views/registrations/. But it’s not suitable for me, because rest of my view (for not customized controllers) still are in /views/devise/registrations.
How Can I fix it?
I think it should work if you scope your RegistrationsController into Devise’s scope:
Of course you can’t use the same name for the RegistrationsController and you have rename the
views/devise/registrationsfolder toviews/devise/my_registrationsand you have to update your routes.rb file as well… but with this setup it should work…Another option, I think, would be to overwrite/inject the method in an initializer:
which may be simpler…