mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
15 lines
311 B
Ruby
15 lines
311 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
class ZoneMember < ActiveRecord::Base
|
|
belongs_to :zone, class_name: 'Spree::Zone', counter_cache: true, inverse_of: :zone_members
|
|
belongs_to :zoneable, polymorphic: true
|
|
|
|
def name
|
|
return nil if zoneable.nil?
|
|
|
|
zoneable.name
|
|
end
|
|
end
|
|
end
|