module Metaractor::FailFromContext
Public Instance Methods
fail_from_context(context:)
click to toggle source
# File lib/metaractor/fail_from_context.rb, line 3 def fail_from_context(context:) return if context.equal?(self) invalidate! if context.invalid? add_errors(errors: context.errors.to_h) @failure = true end