app/models/caboose_rets/property.rb in caboose-rets-0.1.126 vs app/models/caboose_rets/property.rb in caboose-rets-0.1.127

- old
+ new

@@ -38,10 +38,16 @@ def office CabooseRets::Office.where(:lo_mls_id => self.list_office_mls_id).first end def full_address - "#{self.street_number} #{self.street_name.blank? ? '' : self.street_name.titleize} #{self.street_suffix.blank? ? '' : self.street_suffix.titleize}" + address = "#{self.unit_number.blank? ? '' : 'Unit ' + self.unit_number + ', '}#{self.street_dir_prefix.blank? ? '' : self.street_dir_prefix + ' '}#{self.street_number} #{self.street_name.blank? ? '' : self.street_name.titleize}#{self.street_suffix.blank? ? '' : ' ' + self.street_suffix.titleize}#{self.street_dir_suffix.blank? ? '' : ' ' + self.street_dir_suffix}" + return address.blank? ? '' : address.gsub('Mc ','Mc') + end + + def full_address_city + address = "#{self.unit_number.blank? ? '' : 'Unit ' + self.unit_number + ', '}#{self.street_dir_prefix.blank? ? '' : self.street_dir_prefix + ' '}#{self.street_number} #{self.street_name.blank? ? '' : self.street_name.titleize}#{self.street_suffix.blank? ? '' : ' ' + self.street_suffix.titleize}#{self.street_dir_suffix.blank? ? '' : ' ' + self.street_dir_suffix}#{self.city.blank? ? '' : '<br />' + self.city.titleize + ', ' + self.state_or_province + ' ' + self.postal_code}" + return address.blank? ? '' : address.gsub('Mc ','Mc') end def parse(data) # puts(data.to_s) # self.access = nil