Sha256: 033df4e61ab78b1767886794fc958121bc225def1c866770392c883bb9a9a8b5

Contents?: true

Size: 329 Bytes

Versions: 7

Compression:

Stored size: 329 Bytes

Contents

class Group < ActiveRecord::Base
  has_many :role_groups
  has_many :roles, through: :role_groups
  has_many :group_users
  has_many :users, through: :group_users
  accepts_nested_attributes_for :role_groups, reject_if: :all_blank, allow_destroy: :true
  validates_presence_of :name
  scope :active, -> { where active: true }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
curupira-0.1.7 spec/tmp/app/models/group.rb
curupira-0.1.6 spec/tmp/app/models/group.rb
curupira-0.1.4 spec/tmp/app/models/group.rb
curupira-0.1.3 spec/tmp/app/models/group.rb
curupira-0.1.2 spec/tmp/app/models/group.rb
curupira-0.1.1 spec/tmp/app/models/group.rb
curupira-0.1.0 spec/tmp/app/models/group.rb