This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
|
class User
|
|
include MongoMapper::Document
|
|
|
|
devise :authenticatable, :recoverable, :rememberable, :trackable
|
|
|
|
# key :use_attributes
|
|
|
|
def method_missing(method)
|
|
safe_read(method)
|
|
end
|
|
|
|
def safe_read(key)
|
|
self[key]
|
|
rescue MongoMapper::KeyNotFound
|
|
return ""
|
|
end
|
|
|
|
end |