lib/mls/models/listing.rb in mls-0.7.1 vs lib/mls/models/listing.rb in mls-0.7.2
- old
+ new
@@ -84,11 +84,11 @@
property :avatar_digest, String, :serialize => false
# Counter Caches
property :photos_count, Fixnum, :serialize => :false
- attr_accessor :address, :agents, :account, :photos, :flyer, :floorplan, :videos
+ attr_accessor :address, :agents, :account, :photos, :flyer, :floorplan, :videos, :similar_photos
def avatar(size='150x100#', protocol='http')
if avatar_digest
"#{protocol}://#{MLS.image_host}/#{avatar_digest}.jpg?s=#{URI.escape(size)}"
else
@@ -254,9 +254,13 @@
class MLS::Listing::Parser < MLS::Parser
def photos=(photos)
@object.photos = photos.map {|p| MLS::Photo::Parser.build(p)}
+ end
+
+ def similar_photos=(photos)
+ @object.similar_photos = photos.map { |p| MLS::Photo::Parser.build(p) }
end
def videos=(videos)
@object.videos = videos.map do |video|
MLS::Video::Parser.build(video)