lib/mls/models/listing.rb in mls-0.11.2 vs lib/mls/models/listing.rb in mls-0.11.3

- old
+ new

@@ -86,11 +86,11 @@ property :avatar_digest, String, :serialize => false # Counter Caches property :photos_count, Fixnum, :serialize => :false - attr_accessor :address, :agents, :account, :photos, :flyer, :floorplan, :videos, :similar_photos, :spaces + attr_accessor :address, :agents, :account, :photos, :flyer, :floorplan, :videos, :similar_photos, :spaces, :primary_agent def avatar(size='150x100#', protocol='http') if avatar_digest "#{protocol}://#{MLS.image_host}/#{avatar_digest}.jpg?s=#{URI.escape(size)}" else @@ -380,7 +380,11 @@ @object.address = MLS::Address::Parser.build(address) end def agents=(agents) @object.agents = agents.map {|a| MLS::Account::Parser.build(a) } + end + + def primary_agent=(agent) + @object.primary_agent = MLS::Account::Parser.build(agent) end end