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.
orbit-4-1/app/models/user.rb

18 lines
301 B
Ruby

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