I'm using Rails 3, with devise and have generated the devise views.
Recently I've had a requirement to create a custom controller to extend Devise::SessionsController, the problem is that once I have my cust开发者_如何学运维om controller it doesn't use the devise views anymore.
Here is my custom controller app/controllers/sessions_controller.rb
class SessionsController < Devise::SessionsController
def destroy
# Add custom code.
super
end
end
I have to copy app/views/devise/sessions/new.html.haml to app/views/sessions to make it work, is there a better way to do this?
Can I still use the devise/sessions/new.html.haml view in my custom controller?
You could always create a symlink from the views/sessions to views/devise/sessions
精彩评论