aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/errors.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* use Array() instead flattenVasiliy Ermolovich2012-11-051-2/+2
| | | | | * move ActiveModel::Errors tests to errors_test.rb * add spec coverage for add_on_empty and add_on_blank
* fix output messages - docs [ci skip]Francesco Rodriguez2012-10-221-16/+16
|
* convert comments to 1.9 hash syntaxAvnerCohen2012-10-221-11/+11
|
* minor edits in AM documentation [ci skip]Francesco Rodriguez2012-10-211-1/+1
|
* AM::Validation#validates: ability to pass custom exception to `:strict` optionBogdan Gusiev2012-08-061-2/+6
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-08-041-0/+13
|\ | | | | | | | | | | Conflicts: activemodel/lib/active_model/secure_password.rb activerecord/lib/active_record/associations/collection_proxy.rb
| * add example to ActiveModel::StrictValidationFailed [ci skip]Francesco Rodriguez2012-07-281-0/+13
| |
* | load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|/
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-06-301-60/+131
|\ | | | | | | | | Conflicts: activemodel/lib/active_model/errors.rb
| * fix punctuation in activemodel/errors [ci skip]Francesco Rodriguez2012-06-251-1/+1
| |
| * add description ActiveModel::StrictValidationField [ci skip]Francesco Rodriguez2012-06-231-0/+10
| |
| * update ActiveModel::Errors#include? documentation [ci skip]Francesco Rodriguez2012-06-221-1/+1
| |
| * add documentation and examples to ActiveModel::Errors [ci skip]Francesco Rodriguez2012-06-221-4/+26
| |
| * update ActiveModel::Errors documentation and minor fixes [ci skip]Francesco Rodriguez2012-06-221-60/+99
| |
* | add :nodoc: to internal implementations [ci skip]Francesco Rodriguez2012-06-221-1/+1
| |
* | change param name to improve documentationFrancesco Rodriguez2012-06-221-2/+2
|/ | | | | | | | | | | | | | | The keys of the error messages are actually attribute names. It makes the documentation easier to understand: # Returns +true+ if the error messages include an error for the given # +attribute+, +false+ otherwise. # # person.errors.messages # => { :name => ["can not be nil"] } # person.errors.include?(:name) # => true # person.errors.include?(:age) # => false def include?(attribute) (v = messages[attribute]) && v.any? end
* Refactor AMo::ErrorsCarlos Antonio da Silva2012-04-271-7/+7
| | | | | * Use merge!, remove reverse_merge * Use case statement instead of is_a? checks
* Fix confusing example in ActiveModel::ErrorsThibaut Courouble2012-04-171-2/+2
|
* Updated/changed useless tr/gsubsJurriaan Pruis2012-04-031-1/+1
|
* AM::Errors: allow :full_messages parameter for #as_jsonBogdan Gusiev2012-02-201-3/+14
|
* replacing ordered hash to ruby hashprasath2012-02-081-4/+3
|
* Generate strict validation error messages with attribute nameCarlos Antonio da Silva2012-02-011-1/+1
|
* Fix translate_error reference for Error#add documentationJonathan del Strother2012-01-251-1/+1
|
* Remove redundant #to_symPaweł Kondzior2012-01-161-1/+1
|
* Fix ActiveModel::Errors#dupPaweł Kondzior2012-01-161-0/+5
| | | | | | | | | Since ActiveModel::Errors instance keeps all error messages as hash we should duplicate this object as well. Previously ActiveModel::Errors was a subclass of ActiveSupport::OrderedHash, which results in different behavior on `dup`, this may result in regression for people relying on it.
* Add ActiveModel::Errors#delete, which was not available after move to use ↵Piotr Sarnacki2012-01-161-0/+5
| | | | delegation
* removed unnessary require active_support/core_ext/array_wrapKarunakar (Ruby)2012-01-061-1/+0
|
* Fixed bug when error message is an empty string.Antonio Roberto2011-12-161-1/+2
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2011-10-201-3/+2
|\
| * Removed mention of deprecated ActiveModel::Errors#onMartin Svalin2011-10-191-3/+2
| |
* | New #added? method on ActiveModel::ErrorsMartin Svalin2011-10-191-7/+23
| | | | | | The #added? method makes it possible to check if a specific error has been added, using the same parameters as for #add.
* | ActiveModel::Errors#generate_message without i18n_scope, and more test cases ↵Martin Svalin2011-10-171-4/+8
|/ | | | for #add
* Add ability to get an individual full error message + test for full_messages.Lawrence Pit2011-09-091-14/+17
|
* add has_key? to ActiveModel::ErrorsDamien Mathieu2011-09-061-0/+1
|
* Implemented strict validation conceptBogdan Gusiev2011-08-171-1/+7
| | | | | | | In order to deliver debug information to dev team instead of display error message to end user Implemented strict validation concept that suppose to define validation that always raise exception when fails
* fix misleading comment (originally made by Tate Johnson, we lost this commit ↵Vijay Dev2011-08-141-1/+1
| | | | while porting to the rails repo)
* Fixed typoTate Johnson2011-08-131-1/+1
|
* Handle the empty array correctly.thedarkone2011-08-131-1/+1
|
* fix incorrect outputVijay Dev2011-06-041-1/+1
|
* Remove extra white spaces on ActiveModel docs.Sebastian Martinez2011-05-231-3/+3
|
* Merge branch 'master' of git://github.com/lifo/docrailsXavier Noria2011-04-031-11/+10
|\
| * Fix formatting and broken markupJohn Firebaugh2011-03-281-11/+10
| |
* | Bring back AMo#i18n_key methodSantiago Pastorino2011-03-301-2/+2
|/
* Revert "Properly interpolate i18n keys in modules [#5572 state:resolved]"Santiago Pastorino2011-02-271-2/+2
| | | | | | | This breaks #6448, you should use :"module/class" as key for namespacing [#6448 state:committed] This reverts commit 8d30193b08bd2321a7a78a1f481bd5e4d4d45557.
* implementing include? on AM::ErrorsAaron Patterson2011-02-091-0/+5
|
* we do not need message to be an arrayAaron Patterson2011-02-091-9/+8
|
* use map rather than array concatenationAaron Patterson2011-02-091-9/+4
|
* favor composition over inheritenceAaron Patterson2011-02-091-9/+33
|
* use 1 call to concat rather than calling << n timesAaron Patterson2011-02-091-4/+4
|
* fix difference between behaviour of blank and emptyHemant Kumar2011-01-051-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>