0

我正在定制我的狂欢电子商务应用程序。起初我添加了spree_bootstrap_frontendgem,我想自定义 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' %>")

但没有任何变化。你能帮助我的第一个自定义视图吗?

4

1 回答 1

0

我认为你应该只使用:textkey 而不是: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' %>")
于 2015-02-27T23:49:00.110 回答