Class: Sequel::Plugins::ActiveModel::Errors
- Inherits:
-
Model::Errors
- Object
- Hash
- Model::Errors
- Sequel::Plugins::ActiveModel::Errors
- Defined in:
- lib/sequel/plugins/active_model.rb
Overview
ActiveModel compliant error class
Constant Summary
Constants inherited from Model::Errors
Model::Errors::ATTRIBUTE_JOINER
Instance Method Summary collapse
-
#[](k) ⇒ Object
Add autovivification so that #[] always returns an array.
Methods inherited from Model::Errors
#add, #count, #empty?, #full_messages, #on
Methods inherited from Hash
#&, #case, #hstore, #pg_json, #pg_jsonb, #sql_expr, #sql_negate, #sql_or, #|, #~
Instance Method Details
#[](k) ⇒ Object
Add autovivification so that #[] always returns an array.
22 23 24 |
# File 'lib/sequel/plugins/active_model.rb', line 22 def [](k) fetch(k){self[k] = []} end |