orbit-basic/app/models/user.rb

18 lines
306 B
Ruby
Raw Normal View History

class User
include MongoMapper::Document
devise :authenticatable, :recoverable, :rememberable, :trackable
key :use_attributes, Array
2010-03-08 09:14:59 +00:00
def method_missing(method)
safe_read(method)
end
def safe_read(key)
self[key]
rescue MongoMapper::KeyNotFound
return ""
end
end