Class: ErrorContainer
- Inherits:
-
Object
- Object
- ErrorContainer
- Defined in:
- app/my_lib/error_container.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
- #error ⇒ Object
-
#initialize ⇒ ErrorContainer
constructor
A new instance of ErrorContainer.
Constructor Details
#initialize ⇒ ErrorContainer
Returns a new instance of ErrorContainer.
6 7 8 |
# File 'app/my_lib/error_container.rb', line 6 def initialize @errors = ActiveModel::Errors.new(self) end |
Class Method Details
.human_attribute_name(attribute) ⇒ Object
16 17 18 |
# File 'app/my_lib/error_container.rb', line 16 def self.human_attribute_name(attribute, *) attribute.to_s.humanize end |
Instance Method Details
#error ⇒ Object
12 13 14 |
# File 'app/my_lib/error_container.rb', line 12 def error errors end |