Sha256: beabc633c13faa3549abb109e9db62ba33f6684700e9823aa484d92f7ae0c5c2

Contents?: true

Size: 365 Bytes

Versions: 9

Compression:

Stored size: 365 Bytes

Contents

class Group < ActiveRecord::Base
  has_many :group_people, dependent: :destroy, autosave: true
  has_many :people, through: :group_people
  belongs_to :owner, class_name: 'Person'

  validates :name, presence: true, length: { in: 1..254 },
                   format: { with: /[a-zA-Z0-9\-_\s]+/, message: 'only alphanumerics, dashes, underscores, and spaces' }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kadmin-0.3.1 test/dummy/app/models/group.rb
kadmin-0.3.0 test/dummy/app/models/group.rb
kadmin-0.2.8 test/dummy/app/models/group.rb
kadmin-0.2.7 test/dummy/app/models/group.rb
kadmin-0.2.6 test/dummy/app/models/group.rb
kadmin-0.2.3 test/dummy/app/models/group.rb
kadmin-0.2.2 test/dummy/app/models/group.rb
kadmin-0.1.7 test/dummy/app/models/group.rb
kadmin-0.1.6 test/dummy/app/models/group.rb