Sha256: 72bf44ec898f7766772c3151616bd3f8de6971b93bcedfc427c7aadb0d31799d

Contents?: true

Size: 159 Bytes

Versions: 1

Compression:

Stored size: 159 Bytes

Contents

Abilities.define do
  can :create, Post
  cannot :read, Post
  can 'destroy', Post.new if admin?
  can :update, Post do |post|
    post.user == self
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
abilities-0.0.1 test/dummy/config/initializers/abilities.rb