diff options
author | Nikita Afanasenko <nafanasenko@spbtv.com> | 2012-11-13 21:19:48 +0400 |
---|---|---|
committer | Nikita Afanasenko <nafanasenko@spbtv.com> | 2012-11-13 21:24:58 +0400 |
commit | b56376b4509073a0ef7fc0a44e51619f1bf11d8e (patch) | |
tree | 5fa67deccfb2488297c1687deebcdf883cf1b5d1 /activerecord/CHANGELOG.md | |
parent | 5ed0381db5e6dff1269f3f22ec4fa69c203c37d9 (diff) | |
download | rails-b56376b4509073a0ef7fc0a44e51619f1bf11d8e.tar.gz rails-b56376b4509073a0ef7fc0a44e51619f1bf11d8e.tar.bz2 rails-b56376b4509073a0ef7fc0a44e51619f1bf11d8e.zip |
Use nil? instead of blank? to check dynamic finder result
It's safe to use `nil?` instead of `blank?` because it's impossible to get an array on finder with bang;
`all_by` finder matches against regex without bang: `when /^find_(all_|last_)?by_([_a-zA-Z]\w*)$/`.
Fixes #7238
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 36f628ee43..40c2399783 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,10 @@ ## Rails 3.2.10 (unreleased) +* Use `nil?` instead of `blank?` to check whether dynamic finder with a bang + should raise RecordNotFound. Fixes #7238. + + *Nikita Afanasenko* + * Use query cache/uncache when using ENV["DATABASE_URL"]. Fixes #6951. [Backport #8074] |