map7
map7

Reputation: 5126

devise custom controller users old views

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?

Upvotes: 0

Views: 659

Answers (1)

Mike Lewis
Mike Lewis

Reputation: 64147

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

Upvotes: 0

Related Questions