aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-02 14:11:04 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-08-02 14:11:04 -0300
commit8dda066fbc408de699051fec1defc9fafb39365c (patch)
treee8ac23acfd647cac7fb3215437a594544db82478 /activerecord/lib
parent3bf2a4c0d2e04545ea34b080ccad8c998783b259 (diff)
parent01c80a12d49ffa4999861ed4b57f72e682d42a64 (diff)
downloadrails-8dda066fbc408de699051fec1defc9fafb39365c.tar.gz
rails-8dda066fbc408de699051fec1defc9fafb39365c.tar.bz2
rails-8dda066fbc408de699051fec1defc9fafb39365c.zip
Merge pull request #16373 from eileencodes/deprecate-reflection-source_macro
Deprecate source_macro
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/reflection.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 575e588f35..10a75530fd 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -152,7 +152,11 @@ module ActiveRecord
JoinKeys.new(foreign_key, active_record_primary_key)
end
- def source_macro; macro; end
+ def source_macro
+ ActiveSupport::Deprecation.warn("ActiveRecord::Base.source_macro is deprecated and " \
+ "will be removed without replacement.")
+ macro
+ end
end
# Base class for AggregateReflection and AssociationReflection. Objects of
# AggregateReflection and AssociationReflection are returned by the Reflection::ClassMethods.
@@ -738,6 +742,8 @@ Joining, Preloading and eager loading of these associations is deprecated and wi
# The macro used by the source association
def source_macro
+ ActiveSupport::Deprecation.warn("ActiveRecord::Base.source_macro is deprecated and " \
+ "will be removed without replacement.")
source_reflection.source_macro
end