lib/mls/models/listing.rb in mls-0.9.8 vs lib/mls/models/listing.rb in mls-0.9.9

- old
+ new

@@ -288,9 +288,10 @@ end def to_hash hash = super hash[:address_attributes] = address.to_hash if address + hash[:spaces_attributes] = spaces.inject([]) { |acc, x| acc << x.to_hash; acc } if spaces hash[:agents_attributes] = agents.inject([]) { |acc, x| acc << x.to_hash; acc } if agents hash[:photo_ids] = photos.map(&:id) if photos hash[:videos_attributes] = videos.map(&:to_hash) unless videos.blank? hash end