加载部分“无路由匹配{:controller =>”devise / home“,:action =>”lng“,:locale =>”en“}”奇怪的设计路由错误

时间:2012-06-22 09:24:18

标签: ruby-on-rails ruby-on-rails-3 routing devise renderpartial

当加载到部分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"}

1 个答案:

答案 0 :(得分:0)

您的routes.rb文件似乎有问题。