lib/mls/models/account.rb in mls-0.2.24 vs lib/mls/models/account.rb in mls-0.2.25
- old
+ new
@@ -1,13 +1,9 @@
class MLS::Account < MLS::Resource
- ROLES = %w(user broker property_manager landlord analyst assistant other)
- DEFAULTS = {:role => 'user'}
-
property :id, Fixnum
- property :type, String, :default => 'User'
- property :role, String, :default => 'user'
+ property :type, String, :default => 'Account'
property :name, String
property :title, String
property :email, String
property :password, String, :serialize => :if_present
property :password_confirmation, String, :serialize => :if_present
@@ -61,10 +57,10 @@
code == 201
end
end
def agent?
- role != 'user' && role != ''
+ type == 'Agent'
end
def favorites
return @favorites if @favorites
response = MLS.get('/account/favorites')