3
4
5
6
7
8
9
10
11
12
13
14
|
# File 'app/models/spree_cm_commissioner/stock_location_decorator.rb', line 3
def self.prepended(base)
base.include SpreeCmCommissioner::ProductType
base.has_one :logo, as: :viewable, class_name: 'SpreeCmCommissioner::VendorLogo', through: :vendor
base.has_many :nearby_places, -> { order(position: :asc) }, class_name: 'SpreeCmCommissioner::VendorPlace', through: :vendor
base.after_commit :update_vendor_location
def update_vendor_location
vendor&.update_location
end
end
|