I\'m trying to split my rails project in a front-end for regular users and a back-end for admins. Therefore i have created a namespace \'admin\' so that i can easily control adm
Both Jack Chu and iain solutions should solve the problem plus generating your views in order to customize the layout of the login form.
So in your config/routes.rb you should have
scope '/subfolder' do
devise_for :admins, :controllers => { :sessions => "subfolder/sessions" }
end
namespace :subfolder do
match '/', :to => 'subcontroller#action'
end
Remember di create your own controllers for sessions as you are already doing.
Probably you will need to generate your views, too by using rails generate devise:views
Check this for any doubt on devise tasks.