我正在使用Devise进行身份验证。我在constraint
内有一条路线。
当这条路线被击中时,我得到一个错误,即Devise的变量未定义。
的routes.rb
Rails.application.routes.draw do
constraints subdomain: 'www' do
root to: "splash#index"
end
devise_for :users, controllers: { registrations: 'registrations', sessions: 'sessions' }
# More routes are here...
end
错误:
undefined local variable or method `destroy_user_session_path' for #<#<Class:0x007fbd23022208>:0x007fbd35769c98>
任何Devise的URL路径都会出现此错误。我该如何解决这个问题?
答案 0 :(得分:0)
尝试查看rake routes
为您提供的内容。
路由问题的答案几乎总是存在。