diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-20 10:04:54 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2014-03-20 10:04:54 -0300 |
commit | a2a7f8bf2039447ea84e4457379a73260c452abf (patch) | |
tree | 1b9828a05058ec835a9a0283960d06c344061703 /activesupport/lib/active_support | |
parent | 3980d403ce230e589a06ac9f8af01a3e0113cc04 (diff) | |
parent | 41548df342197ac5bf2556f3fa508be6e090ca70 (diff) | |
download | rails-a2a7f8bf2039447ea84e4457379a73260c452abf.tar.gz rails-a2a7f8bf2039447ea84e4457379a73260c452abf.tar.bz2 rails-a2a7f8bf2039447ea84e4457379a73260c452abf.zip |
Merge pull request #14271 from akshay-vishnoi/fixes
Deprecate superclass_delegating_accessor, use class_attribute instead.
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/class/delegating_attributes.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb index c2219beb5a..1c305c5970 100644 --- a/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb +++ b/activesupport/lib/active_support/core_ext/class/delegating_attributes.rb @@ -1,5 +1,7 @@ require 'active_support/core_ext/kernel/singleton_class' require 'active_support/core_ext/module/remove_method' +require 'active_support/core_ext/module/deprecation' + class Class def superclass_delegating_accessor(name, options = {}) @@ -21,6 +23,8 @@ class Class end end + deprecate superclass_delegating_accessor: :class_attribute + private # Take the object being set and store it in a method. This gives us automatic # inheritance behavior, without having to store the object in an instance |