diff options
author | Jan De Poorter <jan@defv.be> | 2009-03-09 13:02:31 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-03-09 13:02:31 +0100 |
commit | 277c799d58be4b3e0e885d7b3fd6d954facc111b (patch) | |
tree | c127a63d516cf8ef7fd5ab9b495e00ae1c522ba3 /activerecord/lib | |
parent | 9442d843ff2ed8e7845707a95482a43aec8efe95 (diff) | |
download | rails-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')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
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 |