lib/mls/models/listing.rb in mls-0.2.15 vs lib/mls/models/listing.rb in mls-0.2.16

- old
+ new

@@ -62,11 +62,11 @@ property :leased_on, DateTime property :flyer_id, Fixnum, :serialize => :if_present property :avatar_digest, String, :serialize => false - attr_accessor :address, :agents, :account, :photos, :flyer, :floor_plan, :videos + attr_accessor :address, :agents, :account, :photos, :flyer, :floorplan, :videos attr_writer :amenities def avatar(size='150x100', protocol='http') if avatar_digest "#{protocol}://#{MLS.asset_host}/photos/#{size}/#{avatar_digest}.jpg" @@ -253,12 +253,11 @@ @object.videos = videos.map do |video| MLS::Video::Parser.build(video) end end - def floor_plan=(floor_plan) - @object.floor_plan = MLS::PDF.new(:digest => floor_plan[:digest], :id => floor_plan[:id].to_i, - :file_url => floor_plan[:file_url], :type => :floor_plan) + def floorplan=(floorplan) + @object.floorplan = MLS::Floorplan::Parser.build(floorplan) end def flyer=(flyer) @object.flyer = MLS::Flyer::Parser.build(flyer) end