aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-05-19 21:49:55 -0700
committerPiotr Sarnacki <drogus@gmail.com>2012-05-19 21:49:55 -0700
commitf7d01ecf753ab8db3ba1b0a10586590b0855a31a (patch)
treef45fe9618360aee66dcb85c088d424c8597fefc6 /activesupport/test
parentc5205041f65206a1490063b08915e7b2a2151a61 (diff)
downloadrails-f7d01ecf753ab8db3ba1b0a10586590b0855a31a.tar.gz
rails-f7d01ecf753ab8db3ba1b0a10586590b0855a31a.tar.bz2
rails-f7d01ecf753ab8db3ba1b0a10586590b0855a31a.zip
Fix `validates_uniqueness_off :field, :allow_nil => false`
Closes (#5853) Uniqueness validator was not properly checking if there are any existing records, when value was `nil` and column was text type. `nil` was converted to string, which resulted in queries looking like: ```sql SELECT 1 FROM "posts" WHERE "posts"."title" = '' LIMIT 1 ``` instead of ```sql SELECT 1 FROM "posts" WHERE "posts"."title" IS NULL LIMIT 1 ```
Diffstat (limited to 'activesupport/test')
0 files changed, 0 insertions, 0 deletions