Sha256: ddcc5b3fda53860e0f60b6feb75d263d0f298b89f5ad929d1ad5994dbf221d33

Contents?: true

Size: 486 Bytes

Versions: 4

Compression:

Stored size: 486 Bytes

Contents

#class Group < ActiveRecord::Base
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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
backlog-0.0.5 app/models/group.rb
backlog-0.1.0 app/models/group.rb
backlog-0.1.1 app/models/group.rb
backlog-0.1.2 app/models/group.rb