Skip to content

Instantly share code, notes, and snippets.

@ngw
Created January 22, 2011 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngw/791003 to your computer and use it in GitHub Desktop.
Save ngw/791003 to your computer and use it in GitHub Desktop.
class User
include Mongoid::Document
field :name, :type => String
field :email, :type => String
attr_accessible :email, :name, :remember_me, :google_atoken, :google_stoken
references_many :questions
references_and_referenced_in_many :followings, :class_name => 'Question', :inverse_of => :followers
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment