#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