diff options
author | José Valim <jose.valim@gmail.com> | 2010-11-24 12:38:52 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-24 12:38:52 +0100 |
commit | 8624065bffd203e1f590ca431d468f9b38e9fb7f (patch) | |
tree | 5ecce040453a8762fae2e3b0467232577473d929 /actionpack/lib/action_view | |
parent | e39138478b38d7a5e0a13756b1bdfa8b43226846 (diff) | |
download | rails-8624065bffd203e1f590ca431d468f9b38e9fb7f.tar.gz rails-8624065bffd203e1f590ca431d468f9b38e9fb7f.tar.bz2 rails-8624065bffd203e1f590ca431d468f9b38e9fb7f.zip |
Allow template handlers to store temp data.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 6c6d659246..831a19654e 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -184,6 +184,11 @@ module ActionView end end + # Used to store template data by template handlers. + def data + @data ||= {} + end + def inspect @inspect ||= if defined?(Rails.root) |