I've created in my app devise in scope
scope '/business' do
devise_for :accounts, :controllers => { :sessions => "business/sessions" }
end
namespace :business do
root to: 'user_profiles#index'
resources :user_profiles
end
Saved devise templates to business/sessions (ex business/sessions/sessions/new.erb) and wrote business/sessions controller
class Business::SessionsController <
Devise::SessionsController
layout: 'temp'
def after_sign_in_path_for(resource)/
"/business"
end
def after_sign_out_path_for(resource)
'/business'
end
end
but when i enter url and is send to login, i see in logs:
Rendered devise/sessions/new.html.erb within layouts/application (94.7ms)
So - not layout and not custom view.
How can i tell devise to use custom layout & views?
Update 1
For views - they should be placed into the directory of the corresponding model ex: views/accounts/sessions/