我正在定制我的狂欢电子商务应用程序。起初我添加了spree_bootstrap_frontend
gem,我想自定义oredres / edit视图,如下所示:
Deface::Override.new(:virtual_path =>"spree/orders/edit",
:name => "continue_shopping",
:replace => "erb[loud]:contains('link_to t(:continue_shopping), products_path')",
:erb => "<%= link_to t(:continue_shopping), products_path, :class => 'btn btn-primary' %>")
但没有变化。 你能帮忙我第一次定制视图吗?
答案 0 :(得分:0)
我认为您应该使用:text
密钥而不是:erb
:
Deface::Override.new(:virtual_path =>"spree/orders/edit",
:name => "continue_shopping",
:replace => "erb[loud]:contains('link_to Spree.t(:continue_shopping), products_path')",
:text => "<%= link_to t(:continue_shopping), products_path, :class => 'btn btn-primary' %>")