app/views/spree/admin/variants/_form.html.erb in spree_backend-3.1.14 vs app/views/spree/admin/variants/_form.html.erb in spree_backend-3.2.0.rc1
- old
+ new
@@ -3,32 +3,32 @@
<div data-hook="variants">
<% @product.option_types.each do |option_type| %>
<div class="form-group" data-hook="presentation">
<%= label :new_variant, option_type.presentation %>
<%= f.collection_select 'option_value_ids', option_type.option_values, :id, :presentation,
- { :include_blank => true }, { :name => 'variant[option_value_ids][]', :class => 'select2' } %>
+ { include_blank: true }, { name: 'variant[option_value_ids][]', class: 'select2' } %>
</div>
<% end %>
<div class="form-group" data-hook="sku">
<%= f.label :sku, Spree.t(:sku) %>
- <%= f.text_field :sku, :class => 'form-control' %>
+ <%= f.text_field :sku, class: 'form-control' %>
</div>
<div class="form-group" data-hook="price">
<%= f.label :price, Spree.t(:price) %>
- <%= f.text_field :price, :value => number_to_currency(@variant.price, :unit => ''), :class => 'form-control' %>
+ <%= f.text_field :price, value: number_to_currency(@variant.price, unit: ''), class: 'form-control' %>
</div>
<div class="form-group" data-hook="cost_price">
<%= f.label :cost_price, Spree.t(:cost_price) %>
- <%= f.text_field :cost_price, :value => number_to_currency(@variant.cost_price, :unit => ''), :class => 'form-control' %>
+ <%= f.text_field :cost_price, value: number_to_currency(@variant.cost_price, unit: ''), class: 'form-control' %>
</div>
<div class="form-group" data-hook="tax_category">
<%= f.label :tax_category_id, Spree.t(:tax_category) %>
- <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => Spree.t('match_choices.none') }, { :class => 'select2' }) %>
+ <%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2' }) %>
</div>
<div class="form-group" data-hook="discontinue_on">
<%= f.label :discontinue_on, Spree.t(:discontinue_on) %>
@@ -39,11 +39,11 @@
</div>
<div class="col-md-6" data-hook="admin_variant_form_additional_fields">
<% [:weight, :height, :width, :depth].each do |field| %>
<div class="form-group" data-hook="<%= field %>"><%= f.label field, Spree.t(field) %>
- <% value = number_with_precision(@variant.send(field), :precision => 2) %>
- <%= f.text_field field, :value => value, :class => 'form-control' %>
+ <% value = number_with_precision(@variant.send(field), precision: 2) %>
+ <%= f.text_field field, value: value, class: 'form-control' %>
</div>
<% end %>
</div>
</div>