class ActionPolicy::NotFound

Raised when Action Policy fails to find a policy class for a record.

Attributes

message[R]
target[R]

Public Class Methods

new(target, message = nil) click to toggle source
# File lib/action_policy.rb, line 19
def initialize(target, message = nil)
  @target = target
  @message =
    message ||
    "Couldn't find policy class for #{target.inspect}" \
    "#{target.is_a?(Module) ? "" : " (#{target.class})"}"
end