Exception: Rails::DataMapper::MultiparameterAssignmentErrors
- Inherits:
-
StandardError
- Object
- StandardError
- Rails::DataMapper::MultiparameterAssignmentErrors
- Defined in:
- lib/dm-rails/multiparameter_attributes.rb
Overview
Raised by Rails::DataMapper::MultiparameterAttributes#attributes= when there are errors when merging multiparameter attributes. Use #errors to get the array of errors occured.
Instance Attribute Summary collapse
-
#errors ⇒ Array<MultiparameterAssignmentError>
readonly
Gets the array of assignment errors.
Instance Method Summary collapse
-
#initialize(errors, message = nil) ⇒ MultiparameterAssignmentErrors
constructor
Initializes a new instance of the MultiparameterAssignmentErrors class.
Constructor Details
#initialize(errors, message = nil) ⇒ MultiparameterAssignmentErrors
Initializes a new instance of the Rails::DataMapper::MultiparameterAssignmentErrors class.
45 46 47 48 |
# File 'lib/dm-rails/multiparameter_attributes.rb', line 45 def initialize(errors, = nil) super( || "#{errors.size} error#{errors.size == 1 ? '' : 's'} on assignment of multiparameter attributes.") @errors = errors end |
Instance Attribute Details
#errors ⇒ Array<MultiparameterAssignmentError> (readonly)
Gets the array of assignment errors.
38 39 40 |
# File 'lib/dm-rails/multiparameter_attributes.rb', line 38 def errors @errors end |