Sha256: 30c60626c7a98a0cab8314d2556514d896755a66b110278c0b1d65cc3d17f3ee

Contents?: true

Size: 205 Bytes

Versions: 2

Compression:

Stored size: 205 Bytes

Contents

class ApplicationPolicy
  attr_reader :user, :record
  
  def initialize(user, record)
    raise Pundit::NotAuthorizedError, "must be logged in" unless user
    @user = user
    @record = record
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sinatra-pundit-0.2.0 example/policies/application_policy.rb
sinatra-pundit-0.1.0 example/policies/application_policy.rb