diff options
author | eileencodes <eileencodes@gmail.com> | 2014-07-30 21:02:57 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2014-08-02 10:01:06 -0400 |
commit | 01c80a12d49ffa4999861ed4b57f72e682d42a64 (patch) | |
tree | e8ac23acfd647cac7fb3215437a594544db82478 /activerecord | |
parent | 3bf2a4c0d2e04545ea34b080ccad8c998783b259 (diff) | |
download | rails-01c80a12d49ffa4999861ed4b57f72e682d42a64.tar.gz rails-01c80a12d49ffa4999861ed4b57f72e682d42a64.tar.bz2 rails-01c80a12d49ffa4999861ed4b57f72e682d42a64.zip |
Deprecate source_macro
`source_macro` is no longer used in any ActiveRecord code. I've
chosen to deprecate it because it was not marked as nodoc and may
be in use outside of rails source.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG.md | 8 | ||||
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index b679d64472..5988ded344 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,11 @@ +* Deprecate `Reflection#source_macro` + + `Reflection#source_macro` is no longer needed in Active Record + source so it has been deprecated. Code that used `source_macro` + was removed in #16353. + + *Eileen M. Uchtitelle*, *Aaron Patterson* + * No verbose backtrace by db:drop when database does not exist. Fixes #16295. 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 |