Sha256: 9911ccb3d92442f940133f6674443fe61da4b7173976e497c0054eeefbacb30e
Contents?: true
Size: 596 Bytes
Versions: 5
Compression:
Stored size: 596 Bytes
Contents
if defined?(Permissive) # Setup some basic models to test with. We'll set permissions on both, # and then test :scope'd permissions through both. class Permissive::Organization < ActiveRecord::Base set_table_name :permissive_organizations end class Permissive::User < ActiveRecord::Base set_table_name :permissive_users end class UserWithRole < ActiveRecord::Base set_table_name :permissive_users_with_roles has_permissions do to :eat, 0 to :sleep, 1 role(:hungry_person) { can :eat } role(:sleepy_person) { can :sleep } end end end
Version data entries
5 entries across 5 versions & 1 rubygems