0
votes

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 custom 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?

1

1 Answers

0
votes

You could always create a symlink from the views/sessions to views/devise/sessions