Sha256: 8741b29f3ae076434f95e3952472bed5abb4d03ff92249791ee5fcc85b3597b9
Contents?: true
Size: 554 Bytes
Versions: 2
Compression:
Stored size: 554 Bytes
Contents
require 'subj_models/concerns/comprising_external_id' module SubjModels module Office def self.included(including_class) including_class.class_eval do include SubjModels::ComprisingExternalId belongs_to :city has_many :event_schedules has_many :order_delivery_pickups has_many :office_contacts, dependent: :destroy validates :name, :address, :lat, :lng, presence: true scope :main, -> { where(is_main: true ) } end end def to_s name end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
subj_models-0.4.1 | lib/subj_models/office.rb |
subj_models-0.4 | lib/subj_models/office.rb |