in your Listing class definition change your import method:
def self.import(file)
CSV.foreach(file.path, headers: true) do |row|
Listing.create!( :price => row[0], :status => row[1],
:beds => row[2], :baths => row[3],
:address_attributes => {:unit_number => row[4]} )
end
end