app/models/caboose_rets/property.rb in caboose-rets-0.1.24 vs app/models/caboose_rets/property.rb in caboose-rets-0.1.25

- old
+ new

@@ -16,11 +16,11 @@ CabooseRets::RetsImporter.import_property(self.matrix_unique_id) end def parse(data) self.access = data['Access'] - self.acreage = data['Acreage'] + self.acreage = data['Acreage'].blank? ? nil : data['Acreage'].to_f self.acreage_source = data['AcreageSource'] self.active_open_house_count = data['ActiveOpenHouseCount'] self.adjoining_land_use = data['AdjoiningLandUse'] self.age = data['Age'] self.annual_taxes = data['AnnualTaxes'] @@ -28,14 +28,14 @@ self.area = data['Area'] self.attic = data['Attic'] self.available_date = data['AvailableDate'] self.basement = data['Basement'] self.basement_yn = data['BasementYN'] - self.baths_full = data['BathsFull'] - self.baths_half = data['BathsHalf'] - self.baths_total = data['BathsTotal'] - self.beds_total = data['BedsTotal'] + self.baths_full = data['BathsFull'].blank? ? nil : data['BathsFull'].to_i + self.baths_half = data['BathsHalf'].blank? ? nil : data['BathsHalf'].to_i + self.baths_total = data['BathsTotal'].blank? ? nil : data['BathsTotal'].to_f + self.beds_total = data['BedsTotal'].blank? ? nil : data['BedsTotal'].to_i self.book_number = data['BookNumber'] self.book_page = data['BookPage'] self.book_type = data['BookType'] self.building_type = data['BuildingType'] self.business_included_yn = data['BusinessIncludedYN'] @@ -108,11 +108,11 @@ self.listing_contract_date = data['ListingContractDate'] self.list_office_mui = data['ListOffice_MUI'] self.list_office_mls_id = data['ListOfficeMLSID'] self.list_office_name = data['ListOfficeName'] self.list_office_phone = data['ListOfficePhone'] - self.list_price = data['ListPrice'] + self.list_price = data['ListPrice'].blank? ? nil : data['ListPrice'].to_f self.lot_description = data['LotDescription'] self.lot_dimensions = data['LotDimensions'] self.lot_dim_source = data['LotDimSource'] self.management = data['Management'] self.master_bed_level = data['MasterBedLevel'] @@ -162,10 +162,10 @@ self.service_type = data['ServiceType'] self.sewer = data['Sewer'] self.sold_terms = data['SoldTerms'] self.sprinkler = data['Sprinkler'] self.sqft_source = data['SqftSource'] - self.sqft_total = data['SqFtTotal'] + self.sqft_total = data['SqFtTotal'].blank? ? nil : data['SqFtTotal'].to_f self.state_or_province = data['StateOrProvince'] self.status = data['Status'] self.status_contractual_search_date = data['StatusContractualSearchDate'] self.street_dir_prefix = data['StreetDirPrefix'] self.street_dir_suffix = data['StreetDirSuffix']