Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | fix tests for SQLite3Adapter | Andrey Deryabin | 2012-04-27 | 1 | -1/+0 |
| | |||||
* | Correct grammar in documentation | Mattias Pfeiffer | 2012-03-07 | 1 | -1/+1 |
| | |||||
* | Change syntax to accept an AR::Relation instead of old conditions hash/array. | Mattias Pfeiffer | 2012-03-07 | 1 | -3/+9 |
| | |||||
* | Add :conditions option to uniqueness validator | Mattias Pfeiffer | 2012-03-07 | 1 | -2/+12 |
| | |||||
* | say unshift when you mean unshift (modulus prepend) | Xavier Noria | 2012-02-11 | 1 | -1/+3 |
| | |||||
* | Remove initialize variable columnn, not needed | Paco Guzman | 2012-01-29 | 1 | -2/+1 |
| | |||||
* | validate related records in the same validation context as parent. | Emmanuel Oga | 2012-01-17 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | E.G.: ```ruby class Parent < ActiveRecord::Base has_one :child validates_presence_of :name, :on => "custom_context" validates_associated :child end class Child < ActiveRecord::Base belongs_to :parent validates_presence_of :name, :on => "custom_context" end p = Parent.new(:name => "Montoto", :child => Child.new) p.valid?(:custom_context) # => Returns true, even though the child is not valid under the same context. ``` | ||||
* | allow association as 1st uniqueness validation arg | Dan Pickett | 2012-01-06 | 1 | -1/+9 |
| | | | #4321 | ||||
* | allow an association as a scope parameter | Dan Pickett | 2012-01-06 | 1 | -0/+5 |
| | | | #4321 | ||||
* | Fixed nil field value uniqueness check | pyromaniac | 2012-01-06 | 1 | -2/+2 |
| | |||||
* | Revert "Merge pull request #2325 from pyromaniac/master" | José Valim | 2012-01-06 | 1 | -1/+1 |
| | | | | | | | It breaks the build for mysql. This reverts commit 958d25df4a1b0d41ce5deeeb0739c93b49bbd18d, reversing changes made to 8f309e31057e1b26fefedb199ab0526126fb1fe4. | ||||
* | Merge pull request #4340 from rafaelfranca/patch-1 | José Valim | 2012-01-05 | 1 | -4/+2 |
|\ | | | | | Remove more Array.wrap calls | ||||
| * | Whitespaces :scissors: | Rafael Mendonça França | 2012-01-06 | 1 | -1/+1 |
| | | |||||
| * | Remove Array.wrap calls in ActiveRecord | Rafael Mendonça França | 2012-01-06 | 1 | -3/+1 |
| | | |||||
* | | Fixed nil field value uniqueness check | pyromaniac | 2012-01-06 | 1 | -1/+1 |
|/ | |||||
* | remove useless call to mb_chars | Sergey Nartimov | 2012-01-05 | 1 | -1/+1 |
| | |||||
* | Do not validate associated records marked for destruction | Olek Janiszewski | 2011-12-05 | 1 | -2/+3 |
| | | | | | | The main reason for this change is to fix a bug where `validates_associated` would prevent `accepts_nested_attributes_for` with `allow_destroy: true` from destroying invalid associated records. | ||||
* | Only use LOWER for mysql case insensitive uniqueness check when column has a ↵ | Joseph Palermo | 2011-10-09 | 1 | -2/+2 |
| | | | | case sensitive collation. | ||||
* | make the warning clear about the effect of using validates_associated on ↵ | Vijay Dev | 2011-08-04 | 1 | -9/+1 |
| | | | | both sides on an association. | ||||
* | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 2 | -4/+4 |
| | |||||
* | Do not use SQL LIKE operator for case insensitive uniqueness validation | Raimonds Simanovskis | 2011-04-25 | 1 | -2/+3 |
| | | | It can result in wrong results if values contain special % or _ characters. It is safer to use SQL LOWER function and compare for equality. | ||||
* | adding a case_sensitive_modifier for forcing comparisons to be case sensitive | Aaron Patterson | 2011-04-11 | 1 | -0/+1 |
| | |||||
* | Refactored uniqueness validator to use Arel instead of hardcoded SQL | Brian Cardarella | 2011-04-10 | 1 | -26/+11 |
| | |||||
* | Adjust unique constraint comment to include info about the RecordNotUnique ↵ | Anders Elfving | 2011-03-13 | 1 | -4/+11 |
| | | | | exception | ||||
* | copy-edits 8d96b89 | Xavier Noria | 2011-02-21 | 1 | -1/+3 |
| | |||||
* | Clarification of ActiveRecord ActiveModel validation documentation | Peer Allan | 2011-02-18 | 1 | -1/+1 |
| | |||||
* | make sure de-serialization happens on object instantiation | Aaron Patterson | 2011-02-01 | 1 | -0/+6 |
| | |||||
* | store the serialized column values in the @attributes hash | Aaron Patterson | 2011-02-01 | 1 | -6/+0 |
| | |||||
* | move the coders to the serialized_attributes hash | Aaron Patterson | 2011-02-01 | 1 | -2/+4 |
| | |||||
* | Fix documentation for validates_uniqueness_of to NOT have a :scope argument ↵ | Ryan Bigg | 2011-01-06 | 1 | -3/+8 |
| | | | | as the prime example. Show scope examples after prime example. | ||||
* | No need to create a variables to use them once. | Emilio Tagua | 2010-11-24 | 1 | -5/+2 |
| | |||||
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -1/+1 |
| | | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Update the validates_uniqueness_of documentation to tell you to use a unique ↵ | Michael Koziarski | 2010-11-08 | 1 | -25/+17 |
| | | | | | | index. The other options mentioned were not good ideas and disclaimed as such in the documentation. | ||||
* | serialized attributes should be serialized before validation [#5525 ↵ | Aaron Patterson | 2010-09-07 | 1 | -0/+5 |
| | | | | state:resolved] | ||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 2 | -12/+12 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | ensuring that description does not exceed 100 columns | Neeraj Singh | 2010-08-02 | 2 | -12/+17 |
| | |||||
* | Make ActiveModel::Errors#add_on_blank and #add_on_empty accept an options ↵ | Jeroen van Dijk | 2010-06-21 | 2 | -2/+2 |
| | | | | | | | | | | | | | | | | hash and make various Validators pass their (filtered) options. This makes it possible to pass additional options through Validators to message generation. E.g. plugin authors want to add validates_presence_of :foo, :format => "some format". Also, cleanup the :default vs :message options confusion in ActiveModel validation message generation. Also, deprecate ActiveModel::Errors#add_on_blank(attributes, custom_message) in favor of ActiveModel::Errors#add_on_blank(attributes, options). Also, refactoring of ActiveModel and ActiveRecord Validation tests. Test are a lot more DRY now. Better test coverage as well now. The first four points were reapplied from an older patch of Sven Fuchs which didn't apply cleanly anymore and was not complete yet. Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Avoid deprecated String#to_a by using Array.wrap(...) instead of Array(...) | Jeremy Kemper | 2010-04-10 | 1 | -1/+3 |
| | |||||
* | use the database to lower case strings rather than ruby. [#4293 state:resolved] | Aaron Patterson | 2010-03-28 | 1 | -4/+2 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | Rename Model.active_relation to Model.unscoped | Pratik Naik | 2010-01-17 | 1 | -1/+1 |
| | |||||
* | Ensure new validates works with uniqueness validator. | José Valim | 2010-01-08 | 2 | -5/+7 |
| | |||||
* | Use relations to build uniqueness conditions | Pratik Naik | 2010-01-02 | 1 | -8/+9 |
| | |||||
* | Fix uniqueness validation: with_exclusive_scope is not public | Jeremy Kemper | 2009-12-28 | 1 | -1/+1 |
| | |||||
* | No need to use ValidationsRepairHelper hack on ActiveModel anymore, ↵ | José Valim | 2009-12-23 | 1 | -1/+1 |
| | | | | Model.reset_callbacks(:validate) is enough. However, tests in ActiveRecord are still coupled, so moved ValidationsRepairHelper back there. | ||||
* | ActiveRecord::Validations are now built on top of Validator as well. | José Valim | 2009-12-23 | 2 | -65/+85 |
| | |||||
* | validate uniqueness with limit in utf8 | Elise Huard | 2009-08-09 | 1 | -1/+1 |
| | | | | | | [#2653 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Move validate_on_create and validate_on_update from ActiveModel to ActiveRecord | Pratik Naik | 2009-03-21 | 1 | -2/+1 |
| | |||||
* | Move uniqueness and association validations to Active Record | Pratik Naik | 2009-03-19 | 2 | -0/+206 |