Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Accept a symbol for `:in` option on inclusion and exclusion validators | Gabriel Sobrinho | 2012-08-24 | 3 | -5/+14 | |
| | ||||||
* | AM::Validation#validates: ability to pass custom exception to `:strict` option | Bogdan Gusiev | 2012-08-06 | 1 | -2/+5 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-08-04 | 3 | -65/+130 | |
|\ | | | | | | | | | | | Conflicts: activemodel/lib/active_model/secure_password.rb activerecord/lib/active_record/associations/collection_proxy.rb | |||||
| * | fix #after_validation example [ci skip] | Francesco Rodriguez | 2012-07-30 | 1 | -1/+1 | |
| | | ||||||
| * | update ActiveModel::Validations::Callbacks documentation [ci skip] | Francesco Rodriguez | 2012-07-29 | 1 | -18/+69 | |
| | | ||||||
| * | update #validates and #validates! documentation [ci skip] | Francesco Rodriguez | 2012-07-29 | 1 | -31/+43 | |
| | | ||||||
| * | update ActiveModel::Valdations#validates_with docs [ci skip] | Francesco Rodriguez | 2012-07-29 | 1 | -16/+18 | |
| | | ||||||
* | | Merge pull request #7253 from acapilleri/lenght_validator_errors_options | Rafael Mendonça França | 2012-08-03 | 1 | -2/+2 | |
|\ \ | | | | | | | calculate errors_options one time in validate_each | |||||
| * | | calculate errors_options one time in validate_each | Angelo Capilleri | 2012-08-03 | 1 | -2/+2 | |
| |/ | | | | | | | | | | | errors_options is calculated for every *CHECKS* but it could be calculated one time because options and RESERVED_OPTIONS not change during this cycle | |||||
* / | load active_support/core_ext/object/blank in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 | |
|/ | ||||||
* | Update documentation and change the range method name to delimiter. | Rafael Mendonça França | 2012-07-20 | 3 | -5/+7 | |
| | ||||||
* | Don't pass `:within` option to the i18n | Rafael Mendonça França | 2012-07-20 | 2 | -2/+2 | |
| | ||||||
* | `validates_inclusion_of` and `validates_exclusion_of` now accept | Rafael Mendonça França | 2012-07-20 | 1 | -3/+6 | |
| | | | | | | `:within` option as alias of `:in` as documented. Fix #7118 | |||||
* | AM::Validations: remove documentation duplicates | Bogdan Gusiev | 2012-07-10 | 9 | -119/+52 | |
| | ||||||
* | add :nodoc: to internal implementations of AM::Validator [ci skip] | Francesco Rodriguez | 2012-07-06 | 1 | -1/+1 | |
| | ||||||
* | fix syntax of AM::Validations::HelperMethods examples [ci skip] | Francesco Rodriguez | 2012-07-05 | 4 | -6/+6 | |
| | ||||||
* | update ActiveModel::Validations::HelperMethods documentation [ci skip] | Francesco Rodriguez | 2012-07-05 | 8 | -130/+141 | |
| | ||||||
* | Use default + merge! instead of reverse_merge | Carlos Antonio da Silva | 2012-06-26 | 1 | -1/+1 | |
| | | | | | Since we're not directly requiring the reverse_merge extension, we can avoid another hash creation by using default_hash.merge! instead. | |||||
* | Set hash value instead of merge a single key, and use flatten! if possible | Carlos Antonio da Silva | 2012-06-26 | 1 | -2/+4 | |
| | | | | | | | | 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. | |||||
* | add :nodoc: to internal implementations [ci skip] | Francesco Rodriguez | 2012-06-25 | 9 | -16/+16 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-06-14 | 2 | -4/+3 | |
|\ | ||||||
| * | Range#cover? is not implemented in AS now | Akira Matsuda | 2012-06-12 | 2 | -4/+3 | |
| | | ||||||
* | | prevent users from unknowingly using bad regexps that can compromise ↵ | MrBrdo | 2012-06-14 | 1 | -3/+20 | |
|/ | | | | security (http://homakov.blogspot.co.uk/2012/05/saferweb-injects-in-various-ruby.html) | |||||
* | Don't enable validations when passing false hash values to ActiveModel.validates | Steve Purcell | 2012-05-28 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Passing a falsey option value for a validator currently causes that validator to be enabled, just like "true": ActiveModel.validates :foo, :presence => false This is rather counterintuitive, and makes it inconvenient to wrap `validates` in methods which may conditionally enable different validators. As an example, one is currently forced to write: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validations = { :presence => true, :slug => true } if options[:unique] validations[:uniqueness] = true end validates :slug, validations end because the following reasonable-looking alternative fails to work as expected: def has_slug(source_field, options={:unique => true}) slugger = Proc.new { |r| r[:slug] = self.class.sluggify(r[source_field]) if r[:slug].blank? } before_validation slugger validates :slug, :presence => true, :slug => true, :uniqueness => options[:unique] end (This commit includes a test, and all activemodel and activerecord tests pass as before.) | |||||
* | fixing removed empty lines and examples | Francesco Rodriguez | 2012-05-16 | 8 | -6/+11 | |
| | ||||||
* | fixing validates_with docs | Francesco Rodriguez | 2012-05-16 | 1 | -6/+4 | |
| | ||||||
* | better format and fixes to validators docs | Francesco Rodriguez | 2012-05-16 | 8 | -104/+154 | |
| | ||||||
* | better example format in validates_exclusion_of docs | Francesco Rodriguez | 2012-05-16 | 1 | -2/+2 | |
| | ||||||
* | Merge pull request #5942 from ↵ | Aaron Patterson | 2012-04-29 | 1 | -1/+2 | |
|\ | | | | | | | | | bcardarella/confirmation_error_message_on_confirmation_attribute confirmation validation error attribute | |||||
| * | Support i18n attributes for confirmation | Brian Cardarella | 2012-04-24 | 1 | -1/+2 | |
| | | ||||||
| * | confirmation validation error attribute | Brian Cardarella | 2012-04-23 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | | | | | | | | | This will render the error message on :#{attribute}_confirmation instead of on attribute itself. When rendering confirmation errors inline on the form with form builders such as SimpleForm and Formtastic it is confusing to the ender user to see the confirmation error message on the attribute element. Instead it makes more sense to have this validation error render on the confirmation field instead. The i18n message has been updated for the confirmation validator error message to include the original attribute name. | |||||
* | | minor docs improvements | Oscar Del Ben | 2012-04-26 | 1 | -3/+3 | |
|/ | ||||||
* | fix ActiveModel::Validations::Callbacks doc | Jan Xie | 2012-04-15 | 1 | -1/+2 | |
| | ||||||
* | Remove code duplication in InclusionValidator and ExclusionValidator. | Rafael Mendonça França | 2012-03-28 | 3 | -44/+39 | |
| | | | | | | | | Orginal code by @jamescook Closes #1352 [Rafael Mendonça França + James Cook] | |||||
* | Prefer || over 'or' for boolean operations | Benjamin Quorning | 2012-02-22 | 1 | -1/+1 | |
| | ||||||
* | remove unnecessary require core_ext/string/encoding | Sergey Nartimov | 2012-02-14 | 1 | -2/+0 | |
| | ||||||
* | To infinity… and beyond! | Niels Ganser | 2012-02-06 | 1 | -2/+2 | |
| | | | | | | | Allow infinite values for validates_length_of. Particularly useful for prettily defining an open ended range such as validates_length_of :human_stupidity, :within => 0..Float::INFINITY | |||||
* | AS::Callbacks: :skip_after_callbacks_if_terminated option | Bogdan Gusiev | 2012-02-03 | 1 | -2/+1 | |
| | ||||||
* | revise docs [ci skip] | Vijay Dev | 2012-02-01 | 1 | -3/+3 | |
| | ||||||
* | Generate strict validation error messages with attribute name | Carlos Antonio da Silva | 2012-02-01 | 1 | -7/+6 | |
| | ||||||
* | whitespaces | dreamfall | 2012-01-17 | 1 | -3/+3 | |
| | ||||||
* | validates method should not change options argument | dreamfall | 2012-01-17 | 1 | -1/+1 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-01-11 | 1 | -1/+1 | |
|\ | ||||||
| * | Update ConfirmationValidator docs, correct when the validator runs | Alan Harper | 2012-01-05 | 1 | -1/+1 | |
| | | ||||||
* | | Remove Array.wrap call in ActiveModel | Rafael Mendonça França | 2012-01-06 | 1 | -2/+2 | |
|/ | ||||||
* | don't call an extra method if options[:tokenizer] is not present | Vasiliy Ermolovich | 2011-12-24 | 1 | -4/+2 | |
| | ||||||
* | use Range#min and Range#max to reduce extra statement | Vasiliy Ermolovich | 2011-12-24 | 1 | -2/+1 | |
| | ||||||
* | deprecate String#encoding_aware? and remove its usage | Sergey Nartimov | 2011-12-24 | 1 | -2/+0 | |
| | ||||||
* | added :other_than => :!= option to numericality validator | Jakub Kuźma | 2011-12-21 | 1 | -2/+3 | |
| | ||||||
* | Ensure length validator also works on 1.8.7. | José Valim | 2011-12-06 | 1 | -6/+17 | |
| |