diff --git a/app/models/spree/line_item_decorator.rb b/app/models/spree/line_item_decorator.rb index d4d5b450a4..be5018d80d 100644 --- a/app/models/spree/line_item_decorator.rb +++ b/app/models/spree/line_item_decorator.rb @@ -32,12 +32,10 @@ Spree::LineItem.class_eval do end } - scope :sorted_by_name_and_unit_value, - # Find line items that are from order sorted by variant name and unit value - joins(:variant=> :product). - reorder('spree_products.name asc, spree_variants.unit_value asc'). - select('spree_line_items.*') - + # Find line items that are from order sorted by variant name and unit value + scope :sorted_by_name_and_unit_value, joins(:variant => :product). + reorder('spree_products.name asc, spree_variants.unit_value asc'). + select('spree_line_items.*') scope :supplied_by, lambda { |enterprise| joins(:product).