Orbit/app/models/user.rb

18 lines
306 B
Ruby

class User
include MongoMapper::Document
devise :authenticatable, :recoverable, :rememberable, :trackable
key :use_attributes, Array
def method_missing(method)
safe_read(method)
end
def safe_read(key)
self[key]
rescue MongoMapper::KeyNotFound
return ""
end
end