Ruby on rails 有时获取未初始化的常量Deviate::CustomDeviate
我已经定制了Ruby on rails 有时获取未初始化的常量Deviate::CustomDeviate,ruby-on-rails,ruby,devise,routing,ruby-on-rails-3.2,Ruby On Rails,Ruby,Devise,Routing,Ruby On Rails 3.2,我已经定制了设计的注册(u controller.rb)和确认(u controller)。这些控制器位于custom_Desive文件夹下 有时我的注册和确认工作正常,但有时它会显示未初始化常量designe::customdesigne路由错误 一个奇怪的修正是每当我编辑routes.rb时,错误就会消失(实际上没有在routes.rb中添加任何内容) 我的routes.rb用于设计: devise_scope :user do scope :module => "custom_d
设计
的注册(u controller.rb)和确认(u controller)。这些控制器位于custom_Desive文件夹下
有时我的注册和确认工作正常,但有时它会显示未初始化常量designe::customdesigne
路由错误
一个奇怪的修正是每当我编辑routes.rb
时,错误就会消失(实际上没有在routes.rb
中添加任何内容)
我的routes.rb
用于设计:
devise_scope :user do
scope :module => "custom_devise" do
match 'company_user/complete_profile' => 'confirmations#complete_profile', via: :get
end
end
devise_for :users, path_names: {sign_in: "login", sign_out: "logout"},
:controllers => { :registrations => "devise/custom_devise/registrations",
:confirmations => "devise/custom_devise/confirmations"
}
我正在使用以下设计模块:
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable
注:我已经检查了所有类似的答案,但没有一个对我有帮助。因此,在重复这个问题之前,请先发表评论。将路径从设计/定制设计/注册更改为定制设计/注册
,而确认
也是如此