Class: ActiveInteraction::Errors
- Inherits:
-
ActiveModel::Errors
- Object
- ActiveModel::Errors
- ActiveInteraction::Errors
- Defined in:
- lib/active_interaction/errors.rb
Overview
An extension that provides the ability to merge other errors into itself.
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
Returns the value of attribute backtrace.
Instance Method Summary collapse
- #local_attribute(attribute) ⇒ Object
-
#merge!(other) ⇒ Errors
Merge other errors into this one.
Instance Attribute Details
#backtrace ⇒ Object
Returns the value of attribute backtrace.
6 7 8 |
# File 'lib/active_interaction/errors.rb', line 6 def backtrace @backtrace end |
Instance Method Details
#local_attribute(attribute) ⇒ Object
20 21 22 |
# File 'lib/active_interaction/errors.rb', line 20 def local_attribute(attribute) attribute.to_s.sub(/\A([^.\[]*).*\z/, '\1').to_sym end |
#merge!(other) ⇒ Errors
Merge other errors into this one.
13 14 15 16 17 |
# File 'lib/active_interaction/errors.rb', line 13 def merge!(other) merge_details!(other) self end |