mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove non-functional :backend scope from Spree::ShippingRate
It finds shipping methods where 'display_on != front_end' but :front_end values were removed in a1317be19b/db/migrate/20200508101630_convert_frontend_shipping_method_to_both.rb so it will always return true.
This commit is contained in:
committed by
Filipe
parent
9b5f743fa5
commit
37617f63ea
@@ -12,13 +12,6 @@ module Spree
|
||||
references(:shipping_method).
|
||||
order("cost ASC")
|
||||
}
|
||||
scope :backend,
|
||||
-> {
|
||||
includes(:shipping_method).
|
||||
where(ShippingMethod.on_backend_query).
|
||||
references(:shipping_method).
|
||||
order("cost ASC")
|
||||
}
|
||||
|
||||
delegate :order, :currency, to: :shipment
|
||||
delegate :name, to: :shipping_method
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
%td{ :colspan => "5" }
|
||||
%div.field.alpha.five.columns
|
||||
= label_tag 'selected_shipping_rate_id', Spree.t(:shipping_method)
|
||||
= select_tag :selected_shipping_rate_id, options_for_select(shipment.shipping_rates.backend.map { |sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id), { :class => 'select2 fullwidth', :data => { 'shipment-number' => shipment.number } }
|
||||
= select_tag :selected_shipping_rate_id, options_for_select(shipment.shipping_rates.map { |sr| ["#{sr.name} #{sr.display_price}", sr.id] }, shipment.selected_shipping_rate_id), { :class => 'select2 fullwidth', :data => { 'shipment-number' => shipment.number } }
|
||||
|
||||
%td.actions
|
||||
- if can? :update, shipment
|
||||
|
||||
Reference in New Issue
Block a user