diff options
author | Mattias Pfeiffer <mattias@pfeiffer.dk> | 2012-03-07 15:59:28 +0100 |
---|---|---|
committer | Mattias Pfeiffer <mattias@pfeiffer.dk> | 2012-03-07 15:59:28 +0100 |
commit | 3d8592657fce0c08e65d52bab00104a552b955cd (patch) | |
tree | 0894ef760ed00696c2186c791b40e6d5c235ca4b /activerecord/test/cases/validations | |
parent | 6185c4947e88f1b6b7c2adaabf62081bac6df04a (diff) | |
download | rails-3d8592657fce0c08e65d52bab00104a552b955cd.tar.gz rails-3d8592657fce0c08e65d52bab00104a552b955cd.tar.bz2 rails-3d8592657fce0c08e65d52bab00104a552b955cd.zip |
Change syntax to accept an AR::Relation instead of old conditions hash/array.
Diffstat (limited to 'activerecord/test/cases/validations')
-rw-r--r-- | activerecord/test/cases/validations/uniqueness_validation_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/validations/uniqueness_validation_test.rb b/activerecord/test/cases/validations/uniqueness_validation_test.rb index 59d24f75e6..376c0000c7 100644 --- a/activerecord/test/cases/validations/uniqueness_validation_test.rb +++ b/activerecord/test/cases/validations/uniqueness_validation_test.rb @@ -327,7 +327,7 @@ class UniquenessValidationTest < ActiveRecord::TestCase end def test_validate_uniqueness_with_conditions - Topic.validates_uniqueness_of(:title, :conditions => ["approved = ?", true]) + Topic.validates_uniqueness_of(:title, :conditions => Topic.where('approved = ?', true)) t1 = Topic.create("title" => "I'm a topic", "approved" => true) t2 = Topic.create("title" => "I'm an unapproved topic", "approved" => false) |