Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Devise controller how to change layout? [duplicate]

How do I change layout in the devise controller?

like image 890
Rails beginner Avatar asked Feb 11 '12 22:02

Rails beginner


1 Answers

You have to subclass the controller like in the following:

class SessionsController < Devise::SessionsController

  layout 'my_layout'  

end

And change the routes:

devise_for :users, :controllers => {:sessions => "sessions"}
like image 83
lucapette Avatar answered Oct 13 '22 11:10

lucapette