aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorstopdropandrew <stopdropandrew@gmail.com>2014-09-15 17:03:10 -0700
committerstopdropandrew <stopdropandrew@gmail.com>2014-09-16 09:51:48 -0700
commit6a3626b978ff721728af5aaca5f9c1d74cd90ff7 (patch)
tree27f2a8b5ab2fc0fbb454c9021b9417a115fab2a2 /activerecord
parent1bdb233bc22cbd2e557d2e0ccca21f04b15eb65a (diff)
downloadrails-6a3626b978ff721728af5aaca5f9c1d74cd90ff7.tar.gz
rails-6a3626b978ff721728af5aaca5f9c1d74cd90ff7.tar.bz2
rails-6a3626b978ff721728af5aaca5f9c1d74cd90ff7.zip
Backwards compat for activerecord-deprecated_finders
Maintain compatibility for: * ActiveRecord::Base#find(:all) * ActiveRecord::Base#find(:first) * ActiveRecord::Base#find(:last)
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/core.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb
index 83859e474a..61f1a9aa27 100644
--- a/activerecord/lib/active_record/core.rb
+++ b/activerecord/lib/active_record/core.rb
@@ -124,6 +124,8 @@ module ActiveRecord
def find(*ids)
# We don't have cache keys for this stuff yet
return super unless ids.length == 1
+ # Allow symbols to super to maintain compatibility for deprecated finders until Rails 5
+ return super if ids.first.kind_of?(Symbol)
return super if block_given? ||
primary_key.nil? ||
default_scopes.any? ||