Created
December 15, 2010 00:43
-
-
Save ngw/741421 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
attr_protected :_id | |
field :username, :type => String | |
field :permalink, :type => String | |
field :email, :type => String | |
field :given_name, :type => String | |
field :family_name, :type => String | |
field :location, :type => String | |
field :gender, :type => String | |
field :subdomain, :type => String | |
field :birthday, :type => Date | |
field :fb_access_token, :type => String | |
field :created_at, :type => DateTime | |
field :updated_at, :type => DateTime | |
validates_presence_of :username, :permalink, :email, :subdomain, :created_at | |
validates_uniqueness_of :username, :permalink, :email, :subdomain | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment