Sha256: 3d84f91e4984f206d542f6c8635f6bc29334c4a506c4a58230494ee1d9b99e1c

Contents?: true

Size: 253 Bytes

Versions: 9

Compression:

Stored size: 253 Bytes

Contents

class <%= role.to_s.camelize %>Permit < Permit::Base
  def initialize(ability, options = {})
    super
  end

  def permit?(user, options = {})
    super
    return if !role_match? user
    <%= permit_logic.strip %>
    <%= license_logic %>
  end  
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cancan-permits-0.3.12 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.11 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.10 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.9 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.8 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.7 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.6 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.5 lib/generators/cancan/permit/templates/role_permit.rb
cancan-permits-0.3.4 lib/generators/cancan/permit/templates/role_permit.rb