aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/caching.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb
index f9f3c37c1c..75aa9df812 100644
--- a/actionpack/lib/action_controller/caching.rb
+++ b/actionpack/lib/action_controller/caching.rb
@@ -636,6 +636,11 @@ module ActionController #:nodoc:
ActionController::Caching::Actions::ActionCachePath.path_for(controller, options)
end
+ # Retrieve instance variables set in the controller.
+ def assigns(key)
+ controller.instance_variable_get("@#{key}")
+ end
+
private
def callback(timing)
controller_callback_method_name = "#{timing}_#{controller.controller_name.underscore}"