Sha256: a0dc3d2fd7c47dc00c81c5ee0c9fb3f9efa04d5d27fc5d988533e6925e38aadc

Contents?: true

Size: 309 Bytes

Versions: 13

Compression:

Stored size: 309 Bytes

Contents

class Ability
  include CanCan::Ability

  def initialize(user)
    user ||= User.new # guest user (not logged in)

    can [:read, :show], [Almanac::Post, Almanac::Blog]
    can :manage, Almanac::Post
    can :manage, Almanac::Blog
    can :manage, Almanac::Comment
    can :manage, Almanac::Image
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
almanac-0.8.0 spec/dummy/app/models/ability.rb
almanac-0.7.4 spec/dummy/app/models/ability.rb
almanac-0.7.3 spec/dummy/app/models/ability.rb
almanac-0.7.2 spec/dummy/app/models/ability.rb
almanac-0.7.1 spec/dummy/app/models/ability.rb
almanac-0.6.1 spec/dummy/app/models/ability.rb
almanac-0.6.0 spec/dummy/app/models/ability.rb
almanac-0.5.3 spec/dummy/app/models/ability.rb
almanac-0.5.2 spec/dummy/app/models/ability.rb
almanac-0.5.1 spec/dummy/app/models/ability.rb
almanac-0.5.0 spec/dummy/app/models/ability.rb
almanac-0.4.5 spec/dummy/app/models/ability.rb
almanac-0.4.4 spec/dummy/app/models/ability.rb