Class: Lead

Inherits:
MLS::Model show all
Defined in:
lib/mls/models/lead.rb

Constant Summary collapse

STATUSES =
%w(delivered connected touring proposals leases closed lost)

Instance Method Summary collapse

Instance Method Details

#regionsObject



8
9
10
# File 'lib/mls/models/lead.rb', line 8

def regions
  Region.where(id: region_ids)
end

#term_units(value = nil) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/mls/models/lead.rb', line 12

def term_units(value=nil)
  value ||= self.term
  case value
  when "<1"
    "year"
  when "flexible"
    ""
  when nil
    ""
  else
    "years"
  end
end