当加载到部分Im以下时,设计会出现奇怪的路由错误。
#lng_select
= I18n.name_for_locale(locale) #lngs
#lngs_col1
%ul
%li
= link_to "English", :controller => 'home', :action => 'lng', :locale => 'en'
%li
= link_to "Dutch", :controller => 'home', :action => 'lng', :locale => 'nl'
%li
/#= link_to "Belgian", :controller => 'home', :action => 'lng', :locale => 'nl'
= link_to "Belgian", "#", :style => "color: #AFAFAF"
%li
/#= link_to "German", :controller => 'home', :action => 'lng', :locale => 'de'
= link_to "German", "#", :style => "color: #AFAFAF"
#lngs_col2
%ul
%li
/#= link_to "Español", :controller => 'home', :action => 'lng', :locale => 'es'
= link_to "Español", "#", :style => "color: #AFAFAF"
%li
/#= link_to "Français", :controller => 'home', :action => 'lng', :locale => 'fr'
= link_to "Français", "#", :style => "color: #AFAFAF"
%li
/#= link_to "Italiano", :controller => 'home', :action => 'lng', :locale => 'it'
= link_to "Italiano", "#", :style => "color: #AFAFAF"
设计的错误输出是:
No route matches {:controller=>"devise/home", :action=>"lng", :locale=>"en"}
答案 0 :(得分:0)
您的routes.rb文件似乎有问题。