Class: I18nAdmin::Errors::Collection

Inherits:
Hash
  • Object
show all
Defined in:
lib/i18n_admin/errors/collection.rb

Instance Method Summary collapse

Instance Method Details

#add(error_or_type, options = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/i18n_admin/errors/collection.rb', line 4

def add(error_or_type, options = {})
  error = error_instance_from(error_or_type, options)

  self[error.type] ||= []
  self[error.type] << error
end