Class: Property
- Inherits:
-
MLS::Model
- Object
- ActiveRecord::Base
- MLS::Model
- Property
- Includes:
- MLS::Avatar, MLS::Slugger
- Defined in:
- lib/mls/property.rb
Instance Method Summary collapse
Methods included from MLS::Avatar
Methods included from MLS::Slugger
Instance Method Details
#default_contact ⇒ Object
17 18 19 20 21 22 |
# File 'lib/mls/property.rb', line 17 def default_contact @default_contact ||= listings.where(lease_state: :listed, ghost: false, authorized: true) .where({ type: ['Lease', 'Sublease']}) .order(size: :desc) .first.try(:contact) end |