Class: ActiveModel::BetterErrors::MachineArrayReporter
- Inherits:
-
ArrayReporter
- Object
- Reporter
- ArrayReporter
- ActiveModel::BetterErrors::MachineArrayReporter
- Defined in:
- lib/active_model/better_errors/machine_array_reporter.rb
Overview
MachineArrayReporter
Instance Attribute Summary
Attributes inherited from Reporter
Instance Method Summary collapse
Methods inherited from Reporter
Constructor Details
This class inherits a constructor from ActiveModel::BetterErrors::Reporter
Instance Method Details
#format_error_message(error_message) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/active_model/better_errors/machine_array_reporter.rb', line 15 def () result = {} result[:attribute] = .attribute.to_s result[:type] = .type || :invalid = . result[:options] = unless .blank? result end |
#to_a ⇒ Object
9 10 11 12 13 |
# File 'lib/active_model/better_errors/machine_array_reporter.rb', line 9 def to_a collection.to_a.map do || end end |