Sha256: db722d9da566f18093abea6bc35d28b8bb6c87afc5632e2edf66182ef7bc2113

Contents?: true

Size: 379 Bytes

Versions: 14

Compression:

Stored size: 379 Bytes

Contents

class Role < ActiveRecord::Base
  has_many :authorizations
  has_many :features, through: :authorizations
  has_many :role_group_users
  has_many :group_users, through: :role_group_users
  has_many :role_groups
  has_many :groups, through: :role_groups
  accepts_nested_attributes_for :authorizations, reject_if: :all_blank, allow_destroy: :true
  validates_presence_of :name
end

Version data entries

14 entries across 7 versions & 1 rubygems

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