Skip to content

Instantly share code, notes, and snippets.

@tarolandia
Created July 11, 2013 14:05
Show Gist options
  • Save tarolandia/5975727 to your computer and use it in GitHub Desktop.
Save tarolandia/5975727 to your computer and use it in GitHub Desktop.
class Group
include Ripple::Document
include Ripple::Encryption
property :name, String, :presence => true
property :user_id, String, :presence => true, :index => true
timestamps!
one :owner, class_name: 'User', foreign_key: :user_id
many :members, class_name: 'GroupMember', using: :inverse, of: :group
attr_accessor :name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment