Sha256: 01dc209765b8706c046f6b803cdcf28918384622a06a6312aa0f9cae7f342124

Contents?: true

Size: 699 Bytes

Versions: 4

Compression:

Stored size: 699 Bytes

Contents

class RoleGroup < ActiveRecord::Base
  has_and_belongs_to_many :permissions,
                          join_table: '<%= group_pms_tb %>', foreign_key: :<%= group_u %>_id,
                          class_name: '<%= permission_c %>', association_foreign_key: :<%= permission_u %>_id

  has_and_belongs_to_many :members,
                          join_table: '<%= group_role_tb %>', foreign_key: :<%= group_u %>_id,
                          class_name: '<%= role_c %>', association_foreign_key: :<%= role_u %>_id

  acts_as_role_group

  # default_scope { with_members) }

  # default_scope { with_permissions) }
end

__END__

  string  :name, null: false
  string  :desc

  index :name, unique: true

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
i_am_i_can-4.3.3 lib/generators/i_am_i_can/templates/models/role_group.erb
i_am_i_can-4.3.2 lib/generators/i_am_i_can/templates/models/role_group.erb
i_am_i_can-4.3.1 lib/generators/i_am_i_can/templates/models/role_group.erb
i_am_i_can-4.3.0 lib/generators/i_am_i_can/templates/models/role_group.erb