我试图在施普雷的产品页面的显示页面上插入一个文本。
我的app/overrides/show_new.html.erb如下:
Deface::Override.new(:virtual_path => "spree/products/show",
:insert_after => "[data-hook='product_show']",
:text => "<p>This is overriding......</p>",
:name => "show_new",
:disabled => false) 但是,视图并没有被覆盖。我是不是遗漏了什么?
发布于 2012-08-10 03:21:36
您必须重新启动您的应用程序才能首先注册覆盖。
否则,这似乎是正确的(假设您的代码位于app/overrides/omething.rb中)
注意,如果你不是在最新的版本,一些视图HTML是损坏的,它打破了丑陋。
https://github.com/spree/spree/issues/1056 (我上周遇到了这个问题)
https://stackoverflow.com/questions/11883088
复制相似问题