Sha256: 77950e2c9332cb7db1328bd95296ed4d5c58b6128d80cdae6e4ade39aa25d14c

Contents?: true

Size: 170 Bytes

Versions: 11

Compression:

Stored size: 170 Bytes

Contents

class BloggingLicense < License::Base
  def initialize name
    super
  end
  
  def enforce!
    can(:read, Blog)
    can(:create, Post)
    owns(user, Post)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
cancan-permits-0.3.12 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.11 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.10 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.9 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.8 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.7 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.6 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.5 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.4 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.2 lib/generators/cancan/licenses/templates/blogging_license.rb
cancan-permits-0.3.1 lib/generators/permits/templates/blogging_license.rb