lib/action_policy.rb in action_policy-0.3.0 vs lib/action_policy.rb in action_policy-0.3.1
- old
+ new
@@ -9,12 +9,12 @@
# Raised when Action Policy fails to find a policy class for a record.
class NotFound < Error
attr_reader :target, :message
- def initialize(target)
+ def initialize(target, message = nil)
@target = target
- @message = "Couldn't find policy class for #{target.inspect}"
+ @message = message || "Couldn't find policy class for #{target.inspect}"
end
end
require "action_policy/version"
require "action_policy/base"