我有一个旧版 Rails 应用程序,它使用了一个非常旧版本的 Spree (spree (0.11.0)),我必须将嵌套资源上移一层。
例如:现在的路径是:/boutique/shop/gourmet-specialties/blah
,而我需要将其更改为/boutique/shop/blah
,没有美食特色部分。
我找到了生成这些链接的部分:
<%- if current_taxon && current_taxon.root == taxonomy.root -%>
<%- taxonomy.root.children.each do |taxon| -%>
<%- unless taxon_preview(taxon).empty? -%>
<li<%= ' class="current"' if current_taxon and ([current_taxon] + current_taxon.ancestors).include?(taxon) %>>
<%= link_to taxon.name, seo_url(taxon), :title => taxon.name %>
</li>
<%- end -%>
<%- end -%>
<%- end -%>
谁能指导我在 Spree 中如何开始或路线如何运作,以便我可以自己进行?路由文件太多,不知道如何交互。谢谢。