Sha256: 343a57af9c8912d09a0182511f98feb154d863ab4f580c5c94e58d9b2c349200
Contents?: true
Size: 742 Bytes
Versions: 1
Compression:
Stored size: 742 Bytes
Contents
class <%= permission_c %> < ActiveRecord::Base has_and_belongs_to_many :related_roles, join_table: '<%= role_pms_tb %>', foreign_key: :<%= role_u %>_id, class_name: '<%= role_c %>', association_foreign_key: :<%= permission_u %>_id <% unless @ii_opts[:without_group] %> has_and_belongs_to_many :related_role_groups, join_table: '<%= group_pms_tb %>', foreign_key: :<%= group_u %>_id, class_name: '<%= group_c %>', association_foreign_key: :<%= permission_u %>_id <% end %> belongs_to :obj, polymorphic: true acts_as_permission end __END__ string :action, null: false string :obj_type integer :obj_id string :desc index %i[ action obj_type obj_id ], unique: true
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
i_am_i_can-4.0.0 | lib/generators/i_am_i_can/templates/models/permission.erb |