Sha256: 623fe38e98829f68dbcf5d8f7310893b52dc6d1c003959792af08c76a43b3ac2
Contents?: true
Size: 546 Bytes
Versions: 84
Compression:
Stored size: 546 Bytes
Contents
class Group < Party class_table_inheritance # TODO (uwe): We need to specify :join_table, :foreign_key and :association_foreign_key # even if they follow the defaults since ClassTableInheritanceInRails breaks it. has_and_belongs_to_many :users, :join_table => "groups_users", :foreign_key => "group_id", :association_foreign_key => 'user_id' validates_presence_of :name validates_length_of :name, :allow_nil => false, :maximum => 255 validates_uniqueness_of :name def includes?(user) return users.include?(user) end end
Version data entries
84 entries across 84 versions & 1 rubygems