Ruby on Rails Devise gem controller overrides and set routes for multiple controllers
In my ROR project I have overrides two controllers
1)registeration controller
2)session controller
while setting routes for these In my routes.rb file I specified
like this
devise_for :users, :controllers => { :registrations => "registrations" }
devise_for :users, :controllers => {:sessions => "sessions" }
In above way It is not taking session controller by default it is going to
Devise::sessionController
just changed the routes in below way
devise_for :users, :controllers => { :registrations => "registrations",:sessions => "sessions" }
It is working fine.
1)registeration controller
2)session controller
while setting routes for these In my routes.rb file I specified
like this
devise_for :users, :controllers => { :registrations => "registrations" }
devise_for :users, :controllers => {:sessions => "sessions" }
In above way It is not taking session controller by default it is going to
Devise::sessionController
just changed the routes in below way
devise_for :users, :controllers => { :registrations => "registrations",:sessions => "sessions" }
It is working fine.
Comments
Post a Comment