Sha256: e93ff1c23ce446f313aa40bab40d11571f0f811c8ebe088db336bacb1f699304

Contents?: true

Size: 274 Bytes

Versions: 11

Compression:

Stored size: 274 Bytes

Contents

class TagPolicy < ApplicationPolicy
  def index?
    true
  end

  def show?
    true
  end

  def create?
    user.try(:has_role?, 'Librarian')
  end

  def update?
    user.try(:has_role?, 'Librarian')
  end

  def destroy?
    user.try(:has_role?, 'Librarian')
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
enju_bookmark-0.3.2 app/policies/tag_policy.rb
enju_bookmark-0.3.1 app/policies/tag_policy.rb
enju_bookmark-0.3.0 app/policies/tag_policy.rb
enju_bookmark-0.3.0.beta.1 app/policies/tag_policy.rb
enju_bookmark-0.2.2 app/policies/tag_policy.rb
enju_bookmark-0.2.1 app/policies/tag_policy.rb
enju_bookmark-0.2.0 app/policies/tag_policy.rb
enju_bookmark-0.2.0.beta.5 app/policies/tag_policy.rb
enju_bookmark-0.2.0.beta.3 app/policies/tag_policy.rb
enju_bookmark-0.2.0.beta.2 app/policies/tag_policy.rb
enju_bookmark-0.2.0.beta.1 app/policies/tag_policy.rb