我在我的ruby on rails应用程序中运行Spree,并且我使用spree_fancy主题(如果这很重要的话)。它看起来是这样的:

如你所见,这里有这样一段文字:“欢迎光临我们令人惊叹的商店!选择任何你喜欢的东西,我们都会把它运到任何地方!”
我想修改那里显示的文本,并添加一些其他标记。
我从github下载了spree源代码,基本上有一个home控制器,它在调用route url时加载:
#frontend/config/routes.rb
root :to => 'home#index'
#frontend/controllers/spree/home_controller.rb
def index
@searcher = Spree::Config.searcher_class.new(params)
@searcher.current_user = try_spree_current_user
@searcher.current_currency = current_currency
@products = @searcher.retrieve_products
end
#views/spree/home/index.html.erb
<%= render :partial => 'spree/shared/products', :locals => { :products => @products } %>
#spree/shared/_products.html.erb
...基本上,我跟踪了整个调用序列,但我在任何地方都找不到包含此文本的视图(我非常怀疑它是否存储在数据库中)。
包含此主页信息的视图在哪里?
发布于 2013-06-24 21:21:04
您可以在以下位置找到spree_fancy主页的源代码:
您有两个选项来替换此内容:
/spree/home/index.html.erb并自定义content
Spree Developer View Customization Guide中对这两个选项进行了更详细的描述
https://stackoverflow.com/questions/17268719
复制相似问题