aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-06-29 16:21:26 +0200
committerGitHub <noreply@github.com>2017-06-29 16:21:26 +0200
commita317af93a39edcd3adbdea21e7d5c377709968f4 (patch)
treeedb7f0595cb56f93adc833bc4dae69b7d586df9b /activerecord/lib/active_record/relation
parent4448873c8755524ccadd639d1a08df53496c36d7 (diff)
parentd9fca84d218f0ed784c7bf6470df42d41838e507 (diff)
downloadrails-a317af93a39edcd3adbdea21e7d5c377709968f4.tar.gz
rails-a317af93a39edcd3adbdea21e7d5c377709968f4.tar.bz2
rails-a317af93a39edcd3adbdea21e7d5c377709968f4.zip
Merge pull request #29619 from kamipo/deprecate_delegating_to_arel_in_relation
Deprecate delegating to `arel` in `Relation`
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r--activerecord/lib/active_record/relation/delegation.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation/delegation.rb b/activerecord/lib/active_record/relation/delegation.rb
index 0e88ef4c7e..48c4dcdef4 100644
--- a/activerecord/lib/active_record/relation/delegation.rb
+++ b/activerecord/lib/active_record/relation/delegation.rb
@@ -89,6 +89,8 @@ module ActiveRecord
self.class.delegate_to_scoped_klass(method)
scoping { @klass.public_send(method, *args, &block) }
elsif arel.respond_to?(method)
+ ActiveSupport::Deprecation.warn \
+ "Delegating #{method} to arel is deprecated and will be removed in Rails 6.0."
self.class.delegate method, to: :arel
arel.public_send(method, *args, &block)
else