使用狂欢在现有的参数中传递新的参数

时间:2015-06-16 08:37:04

标签: ruby-on-rails-4

我写deface用于在订单页面中添加新文本字段,我想使用spree默认控制器更新此记录

供应商/礼包/管理/ _shipment / time_window.er.deface

$('#collapseDiv').on('shown.bs.collapse', function () {
 $('.icon-before').attr('data-icon', '&#xf147').text('Show Less');
});

$('#collapseDiv').on('hidden.bs.collapse', function () {
 $('.icon-before').attr('data-icon', '&#xf196').text('Show More');
});

spree.rb

<!-- insert_after 'div[data-hook="admin_shipment_form"] tr.edit-method div' -->

<% if @order.shipping_method_id.present? %>
<div class="field alpha five columns">
        <label><%= Spree.t(:fulfillment_time_window) %>:</label>

            <%= text_field_tag :fulfillment_time_window, @order.fulfillment_time_window %>  

        </div>

</div>

我想在订单表中更新此字段

但它没有在params中传递此属性

提前致谢

0 个答案:

没有答案