Sha256: 624e889198f2d09ad1adc45d8afdef4712d0d65114b5a628a39ec1f47ed7f66f

Contents?: true

Size: 312 Bytes

Versions: 5

Compression:

Stored size: 312 Bytes

Contents

class Organization < MLS::Model
  include MLS::Avatar
  include MLS::Slugger
  
  has_many :accounts, :class_name => 'Account'
  has_many :listings, -> { distinct }, through: :accounts
  has_many :references, as: :subject
  has_and_belongs_to_many :regions
  
  def name
    common_name || legal_name
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mls-1.9.0 lib/mls/models/organization.rb
mls-1.8.0 lib/mls/models/organization.rb
mls-1.7.0 lib/mls/models/organization.rb
mls-1.6.0 lib/mls/models/organization.rb
mls-1.5.1 lib/mls/organization.rb