aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-17 16:02:55 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-17 16:02:55 -0300
commit84087966e84a9875fdf707193f376ffea8c80610 (patch)
tree2959b366baddd2bf57182bb2517408c7ff0fe6c5 /activerecord
parent8c6c1dd82eec0f2e358146ffff7b6adfbb530d5f (diff)
parent6a3626b978ff721728af5aaca5f9c1d74cd90ff7 (diff)
downloadrails-84087966e84a9875fdf707193f376ffea8c80610.tar.gz
rails-84087966e84a9875fdf707193f376ffea8c80610.tar.bz2
rails-84087966e84a9875fdf707193f376ffea8c80610.zip
Merge pull request #16929 from kongregate/fix-activerecord-deprecated_finders-find-symbol
ActiveRecord deprecated finders are broken in 4.2
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? ||