I use Devise for authentication. I have a route inside constraint.
When I hit this route, I get an error message indicating that the Devage variables are undefined.
routes.rb
Rails.application.routes.draw do
constraints subdomain: 'www' do
root to: "splash#index"
end
devise_for :users, controllers: { registrations: 'registrations', sessions: 'sessions' }
end
Error:
undefined local variable or method `destroy_user_session_path' for #<#<Class:0x007fbd23022208>:0x007fbd35769c98>
This error occurs for any of the Devise URLs. How can i fix this?
source
share