aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations.rb
Commit message (Collapse)AuthorAgeFilesLines
* Remove extra white spaces on ActiveModel docs.Sebastian Martinez2011-05-231-1/+1
|
* :if should not fire on validations when not in context with :onAditya Sanghi2011-04-291-1/+1
|
* formatting changesVijay Dev2011-03-071-3/+3
|
* copy-edits 8d96b89Xavier Noria2011-02-211-2/+2
|
* Clarification of ActiveRecord ActiveModel validation documentationPeer Allan2011-02-181-2/+2
|
* Use map + flatten hereSantiago Pastorino2011-02-071-3/+3
|
* Find all validators for multiple attributesCarl Lerche2011-02-051-2/+4
|
* Use run_callbacks; the generated _run_<name>_callbacks method is not a ↵John Firebaugh2011-01-311-1/+1
| | | | | | public interface. Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Tests and docs which explain the use of validate with a block and without ↵Santiago Pastorino2010-12-191-1/+11
| | | | arguments
* Fix syntax error in ActiveModel::Validations .validate examplefastred2010-10-011-1/+1
|
* Fixing documentation to reflect deprecated add_to_baseMikel Lindsaar2010-09-121-2/+2
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-16/+16
| | | | 's/[ \t]*$//' -i {} \;)
* Add missing ActiveModel::Validations requireGreg Campbell2010-08-121-0/+1
| | | | | | | | | | | [#5311 state: resolved] ActiveModel::Validations uses Hash#except, but does not require it from ActiveSupport. (This wasn't showing up in the tests, because it was required in the helper, and was also required in ActiveModel::Serialization). Signed-off-by: José Valim <jose.valim@gmail.com>
* Freeze options so we raise an error when people modify it in place.José Valim2010-08-031-2/+4
|
* edit pass to apply API guideline wrt the use of "# =>" in example codeXavier Noria2010-07-301-11/+7
|
* Merge remote branch 'rails/master'Xavier Noria2010-06-201-2/+9
|\ | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb
| * ActiveModel::Validations::Callbacks should not be required by default.José Valim2010-06-191-1/+18
| |
| * moving before_validation and after_validation functionality from ↵Neeraj Singh2010-06-191-12/+2
| | | | | | | | | | | | | | | | ActiveRecord to ActiveModel [#4653 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* | Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-151-2/+2
|\ \ | |/ |/|
| * Fix a bunch of minor spelling mistakesEvgeniy Dolzhenko2010-06-111-2/+2
| |
* | Revised the rest of the files from ActiveModel.Rizwan Reza2010-06-141-17/+23
|/
* class_attribute is not a direct replacement of class_inheritable_*.José Valim2010-06-101-5/+11
| | | | | | If you are setting a hash or an array in class_attribute or you need to freeze it, to ensure people won't modify it in place or you need to dup it on inheritance.
* Validators should at model level and not at AR:Base level [Closes #4804]Neeraj Singh2010-06-101-1/+1
| | | | | | [#4804 state:resolved] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* minor changes to instance level validations implementation based on feedback ↵Josh Kalderimis2010-05-131-1/+2
| | | | from José Valim
* validation macros can now be used within an instanceJosh Kalderimis2010-05-131-6/+3
|
* updated AMo validations to use a context for valid? and invalid?, removing ↵Josh Kalderimis2010-05-081-5/+12
| | | | the dependency on AR
* Makes validates_acceptance_of to not override database fields [#4460 ↵Santiago Pastorino2010-04-281-0/+3
| | | | | | state:committed] Signed-off-by: José Valim <jose.valim@gmail.com>
* Use Array.wrap uniformlyJeremy Kemper2010-03-271-1/+2
|
* Remove reference to unexistent methods and fix typo.José Valim2010-03-261-1/+0
|
* Accept array of attributes as arg also, like 2.3Jeremy Kemper2010-02-251-1/+1
|
* Add validators reflection so you can do 'Person.validators' and ↵Prem Sichanugrist2010-02-211-3/+18
| | | | | | 'Person.validators_on(:name)'. Signed-off-by: José Valim <jose.valim@gmail.com>
* Full update on ActiveModel documentationMikel Lindsaar2010-02-011-1/+38
|
* Allow :if, :unless, :on, :allow_nil and :allow_blank as shared options in ↵José Valim2010-01-071-3/+1
| | | | validates.
* Add validates method as shortcut to setup validators for a given set of ↵jamie2010-01-071-27/+40
| | | | | | | | | | | | | | | attributes: class Person < ActiveRecord::Base include MyValidators validates :name, :presence => true, :uniqueness => true, :length => { :maximum => 100 } validates :email, :presence => true, :email => true end [#3058 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge commit 'josevalim/validations'Jeremy Kemper2009-12-281-33/+23
|\
| * validates_each uses a BlockValidator.José Valim2009-12-231-33/+23
| |
* | All AMo modules are safe to deferJoshua Peek2009-12-221-0/+1
|/
* Move validator, human_name and human_attribute_name to ActiveModel, remove ↵José Valim2009-10-201-0/+1
| | | | | | deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche <carllerche@mac.com>
* Callbacks, DeprecatedCallbacks = NewCallbacks, CallbacksJoshua Peek2009-10-121-6/+4
|
* Refactor new callbacks and AR implementation.José Valim2009-09-081-2/+2
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-6/+10
| | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Use send instead of instance_evalPratik Naik2009-08-061-1/+1
|
* Allow validations to use values from custom readers [#2936 state:resolved]James Hill2009-08-051-1/+23
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add some missing dependenciesYehuda Katz2009-07-151-0/+2
|
* Simplify AMo validation attribute readerJoshua Peek2009-06-171-5/+1
|
* Properly require ActiveModel validation dependenciesJoshua Peek2009-06-081-4/+6
|
* Use AS::Concern in ActiveModelJoshua Peek2009-05-301-4/+5
|
* Deprecate Model#validate/validate_on_create/validate_on_update. Use ↵Pratik Naik2009-03-211-9/+0
| | | | Model.validate :method and likewise
* Get rid of active_model/core and active_model/callbacksPratik Naik2009-03-211-2/+0
|
* Remove DEFAULT_VALIDATION_OPTIONS from validationsPratik Naik2009-03-211-2/+0
|