Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | minor edits in AM documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -1/+1 | |
| | | ||||||
* | | active_model/validations requires necessary files to run | Yves Senn | 2012-10-18 | 1 | -0/+1 | |
| | | ||||||
* | | cleanup, replace non-breaking spaces with spaces | Yves Senn | 2012-10-18 | 1 | -5/+5 | |
|/ | ||||||
* | Use the `flat_map` method. | Rafael Mendonça França | 2012-10-03 | 1 | -2/+2 | |
| | | | | Thanks to @jeremy to teach me this one. | |||||
* | Revert "Merge pull request #7826 from sikachu/master-validators-kind" | Rafael Mendonça França | 2012-10-02 | 1 | -14/+1 | |
| | | | | | | | | | | | | | | | | This reverts commit 4e9f53f9736544f070e75e516c71137b7eb49a7a, reversing changes made to 6b802cdb4f5b84e1bf49aaeb0e994b3be6028af9. Revert "Don't use tap in this case." This reverts commit 454d820bf0a18fe1db4c55b0145197d70fef1f82. Reason: Is not a good idea to add options to this method since we can do the same thing using method composition. Person.validators_on(:name).select { |v| v.kind == :presence } Also it avoids to change the method again to add more options. | |||||
* | Don't use tap in this case. | Rafael Mendonça França | 2012-10-02 | 1 | -5/+7 | |
| | | | | | The use of tap in this case is very confusing since we are mutating the return value inside the block | |||||
* | Make `.validators_on` accept `:kind` option | Prem Sichanugrist | 2012-10-02 | 1 | -1/+12 | |
| | | | | | This will filter out the validators on a particular attribute based on its kind. | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-08-04 | 1 | -35/+126 | |
|\ | | | | | | | | | | | Conflicts: activemodel/lib/active_model/secure_password.rb activerecord/lib/active_record/associations/collection_proxy.rb | |||||
| * | update ActiveModel::Validations docs [ci skip] | Francesco Rodriguez | 2012-07-29 | 1 | -35/+126 | |
| | | ||||||
* | | load active_support/core_ext/class/attribute in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 | |
|/ | ||||||
* | Set hash value instead of merge a single key, and use flatten! if possible | Carlos Antonio da Silva | 2012-06-26 | 1 | -2/+1 | |
| | | | | | | | | There's no need to create two extra hashes with options.merge(another_hash), with the goal of setting only one value, so lets just set it. Also refactor validates_each to use _merge_attributes, like other validates_* helpers do. | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-06-22 | 1 | -2/+15 | |
|\ | ||||||
| * | fixes a few mistakes in api docs [ci skip] | Vijay Dev | 2012-06-22 | 1 | -1/+1 | |
| | | ||||||
| * | add example to ActiveModel::Validations#validators [ci skip] | Francesco Rodriguez | 2012-06-15 | 1 | -2/+15 | |
| | | ||||||
* | | Simplify AR configuration code. | Jon Leighton | 2012-06-15 | 1 | -2/+1 | |
|/ | | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc. | |||||
* | Kill whitespaces :scissors: | Carlos Antonio da Silva | 2012-05-15 | 1 | -2/+2 | |
| | ||||||
* | clean the erros if an object that includes validations errors is duped. ↵ | Angelo Capilleri | 2012-05-13 | 1 | -0/+6 | |
| | | | | Fixes #5953 | |||||
* | minor docs improvements | Oscar Del Ben | 2012-04-26 | 1 | -1/+1 | |
| | ||||||
* | Add documentation for validate options | Oscar Del Ben | 2012-04-26 | 1 | -0/+13 | |
| | ||||||
* | Enhance validations documentation | Oscar Del Ben | 2012-04-26 | 1 | -1/+1 | |
| | ||||||
* | replacing ordered hash to ruby hash | prasath | 2012-02-08 | 1 | -1/+1 | |
| | ||||||
* | Remove Array.wrap call in ActiveModel | Rafael Mendonça França | 2012-01-06 | 1 | -2/+1 | |
| | ||||||
* | Support configuration on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -2/+3 | |
| | | | | | | | | | | | | | | | The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present. | |||||
* | Remove extra white spaces on ActiveModel docs. | Sebastian Martinez | 2011-05-23 | 1 | -1/+1 | |
| | ||||||
* | :if should not fire on validations when not in context with :on | Aditya Sanghi | 2011-04-29 | 1 | -1/+1 | |
| | ||||||
* | formatting changes | Vijay Dev | 2011-03-07 | 1 | -3/+3 | |
| | ||||||
* | copy-edits 8d96b89 | Xavier Noria | 2011-02-21 | 1 | -2/+2 | |
| | ||||||
* | Clarification of ActiveRecord ActiveModel validation documentation | Peer Allan | 2011-02-18 | 1 | -2/+2 | |
| | ||||||
* | Use map + flatten here | Santiago Pastorino | 2011-02-07 | 1 | -3/+3 | |
| | ||||||
* | Find all validators for multiple attributes | Carl Lerche | 2011-02-05 | 1 | -2/+4 | |
| | ||||||
* | Use run_callbacks; the generated _run_<name>_callbacks method is not a ↵ | John Firebaugh | 2011-01-31 | 1 | -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 Pastorino | 2010-12-19 | 1 | -1/+11 | |
| | | | | arguments | |||||
* | Fix syntax error in ActiveModel::Validations .validate example | fastred | 2010-10-01 | 1 | -1/+1 | |
| | ||||||
* | Fixing documentation to reflect deprecated add_to_base | Mikel Lindsaar | 2010-09-12 | 1 | -2/+2 | |
| | ||||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -16/+16 | |
| | | | | 's/[ \t]*$//' -i {} \;) | |||||
* | Add missing ActiveModel::Validations require | Greg Campbell | 2010-08-12 | 1 | -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é Valim | 2010-08-03 | 1 | -2/+4 | |
| | ||||||
* | edit pass to apply API guideline wrt the use of "# =>" in example code | Xavier Noria | 2010-07-30 | 1 | -11/+7 | |
| | ||||||
* | Merge remote branch 'rails/master' | Xavier Noria | 2010-06-20 | 1 | -2/+9 | |
|\ | | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb | |||||
| * | ActiveModel::Validations::Callbacks should not be required by default. | José Valim | 2010-06-19 | 1 | -1/+18 | |
| | | ||||||
| * | moving before_validation and after_validation functionality from ↵ | Neeraj Singh | 2010-06-19 | 1 | -12/+2 | |
| | | | | | | | | | | | | | | | | ActiveRecord to ActiveModel [#4653 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | | Fix a bunch of minor spelling mistakes | Evgeniy Dolzhenko | 2010-06-15 | 1 | -2/+2 | |
|\ \ | |/ |/| | ||||||
| * | Fix a bunch of minor spelling mistakes | Evgeniy Dolzhenko | 2010-06-11 | 1 | -2/+2 | |
| | | ||||||
* | | Revised the rest of the files from ActiveModel. | Rizwan Reza | 2010-06-14 | 1 | -17/+23 | |
|/ | ||||||
* | class_attribute is not a direct replacement of class_inheritable_*. | José Valim | 2010-06-10 | 1 | -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 Singh | 2010-06-10 | 1 | -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 Kalderimis | 2010-05-13 | 1 | -1/+2 | |
| | | | | from José Valim | |||||
* | validation macros can now be used within an instance | Josh Kalderimis | 2010-05-13 | 1 | -6/+3 | |
| | ||||||
* | updated AMo validations to use a context for valid? and invalid?, removing ↵ | Josh Kalderimis | 2010-05-08 | 1 | -5/+12 | |
| | | | | the dependency on AR | |||||
* | Makes validates_acceptance_of to not override database fields [#4460 ↵ | Santiago Pastorino | 2010-04-28 | 1 | -0/+3 | |
| | | | | | | state:committed] Signed-off-by: José Valim <jose.valim@gmail.com> |