Search code examples
ruby-on-railsruby-on-rails-3routesdeviserenderpartial

strange devise routing error on loading partial " No route matches {:controller=>"devise/home", :action=>"lng", :locale=>"en"} "


When loading below partial Im getting strange routing errors for devise.

#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"

The error output by devise is:

No route matches {:controller=>"devise/home", :action=>"lng", :locale=>"en"}

Solution

  • It seems that there is something wrong about your routes.rb file.