aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
diff options
context:
space:
mode:
authorJan De Poorter <jan@defv.be>2009-03-09 13:02:31 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2009-03-09 13:02:31 +0100
commit277c799d58be4b3e0e885d7b3fd6d954facc111b (patch)
treec127a63d516cf8ef7fd5ab9b495e00ae1c522ba3 /activerecord/lib/active_record/base.rb
parent9442d843ff2ed8e7845707a95482a43aec8efe95 (diff)
downloadrails-277c799d58be4b3e0e885d7b3fd6d954facc111b.tar.gz
rails-277c799d58be4b3e0e885d7b3fd6d954facc111b.tar.bz2
rails-277c799d58be4b3e0e885d7b3fd6d954facc111b.zip
Fix find_by_last when order is given [#2127 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 60a1221e66..d8337602e8 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -2174,7 +2174,7 @@ module ActiveRecord #:nodoc:
# Test whether the given method and optional key are scoped.
def scoped?(method, key = nil) #:nodoc:
if current_scoped_methods && (scope = current_scoped_methods[method])
- !key || scope.has_key?(key)
+ !key || !scope[key].nil?
end
end