aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-03-02 09:31:40 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-03-02 09:31:40 -0800
commit69e348013bc3ce4289c5fefc29c1aacc47048c0d (patch)
treed856dfa248e6c3bd9e4c00b4dc7e2bfbb8909687 /activesupport/lib
parent66245441d4471f29043433f6cf789498cf35b96c (diff)
downloadrails-69e348013bc3ce4289c5fefc29c1aacc47048c0d.tar.gz
rails-69e348013bc3ce4289c5fefc29c1aacc47048c0d.tar.bz2
rails-69e348013bc3ce4289c5fefc29c1aacc47048c0d.zip
adding deprecation noticies to deprecated class cache methods
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/dependencies.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 97e20bdaf4..4abeb74c45 100644
--- a/activesupport/lib/active_support/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
@@ -557,6 +557,7 @@ module ActiveSupport #:nodoc:
def get
Reference.get @name
end
+ deprecate :get
end
def new(name)
@@ -565,6 +566,11 @@ module ActiveSupport #:nodoc:
end
deprecate :new
+ def store(name)
+ self[name] = name
+ self
+ end
+
def clear!
@store.clear
end
@@ -575,7 +581,14 @@ module ActiveSupport #:nodoc:
def ref(name)
Reference.new(name)
end
+ deprecate :ref
+
+ # Store a reference to a class +klass+.
+ def reference(klass)
+ Reference.store klass
+ end
+ # Get the reference for class named +name+.
def constantize(name)
Reference.get(name)
end