K
K
Koinu2019-05-08 12:02:03
Ruby on Rails
Koinu, 2019-05-08 12:02:03

Why does an error occur when trying to change the language in the spree application?

Hello, I made a store based on spree commerce, everything went well until I tried to change the default localization, according to the documentation I downloaded the i18n gem, added it to the config/application.rb file, but the server gives an error ActionController::UrlGenerationError in Spree::Home#index , No route matches {:action=>"show", :controller=>"spree/taxons", :id=>nil}, possible unmatched constraints: [:id]config.i18n.default_locale = :ru

<% if taxonomy.root.children.any? %>
        <h4 class='taxonomy-root'><%= Spree.t(:shop_by_taxonomy, taxonomy: taxonomy.name) %></h4>
      <%= taxons_tree(taxonomy.root, @taxon, max_level) %>
      <% end %>
    <% end %>
  <% end %>

If you believe the logs, then the error is in this line <%= taxons_tree(taxonomy.root, @taxon, max_level) %>
Please tell me what is the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question