diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-03 12:11:30 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-02-03 12:11:30 +0000 |
commit | 72640c61252e43ed51da368a3122fd507b7b93a6 (patch) | |
tree | bf900449e453e4065e16215dd7f3c029d36684d8 /actionpack | |
parent | 53eca3abc8c4f0627ee1bb7ff61caa32392d6384 (diff) | |
download | rails-72640c61252e43ed51da368a3122fd507b7b93a6.tar.gz rails-72640c61252e43ed51da368a3122fd507b7b93a6.tar.bz2 rails-72640c61252e43ed51da368a3122fd507b7b93a6.zip |
Cache partial variable names to reduce garbage
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8793 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/partials.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index f0f51e5176..a945e9907d 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -172,7 +172,9 @@ module ActionView end def partial_variable_name(partial_name) - partial_name.split('/').last.split('.').first.intern + @@partial_variable_names ||= {} + @@partial_variable_names[partial_name] ||= + partial_name.split('/').last.split('.').first.intern end def extracting_object(partial_name, object_assigns) |