diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-17 16:02:55 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-09-17 16:02:55 -0300 |
commit | 84087966e84a9875fdf707193f376ffea8c80610 (patch) | |
tree | 2959b366baddd2bf57182bb2517408c7ff0fe6c5 /activerecord | |
parent | 8c6c1dd82eec0f2e358146ffff7b6adfbb530d5f (diff) | |
parent | 6a3626b978ff721728af5aaca5f9c1d74cd90ff7 (diff) | |
download | rails-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.rb | 2 |
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? || |