Class: Spree::Stock::LocationSorter::DefaultFirst

Inherits:
Base
  • Object
show all
Defined in:
core/app/models/spree/stock/location_sorter/default_first.rb

Overview

This stock location sorter will give priority to the default stock location.

Instance Attribute Summary

Attributes inherited from Base

#stock_locations

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Spree::Stock::LocationSorter::Base

Instance Method Details

#sortObject



9
10
11
# File 'core/app/models/spree/stock/location_sorter/default_first.rb', line 9

def sort
  stock_locations.order_default
end