diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-08-08 23:43:45 -0300 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-09 04:12:08 -0300 |
commit | 0ab40b039bf7b7882a31ab187916bc2dc5a8ae7c (patch) | |
tree | 873f2acc966ef3e3f68b3c0f7f0375c43c49813b /actionpack/lib/action_view/template/template.rb | |
parent | 930d235981c429bde8a604622393f70ec69a4985 (diff) | |
download | rails-0ab40b039bf7b7882a31ab187916bc2dc5a8ae7c.tar.gz rails-0ab40b039bf7b7882a31ab187916bc2dc5a8ae7c.tar.bz2 rails-0ab40b039bf7b7882a31ab187916bc2dc5a8ae7c.zip |
Went from 25% slower partials (vs. 2.3) to 10% faster. More to come.
Diffstat (limited to 'actionpack/lib/action_view/template/template.rb')
-rw-r--r-- | actionpack/lib/action_view/template/template.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/template/template.rb b/actionpack/lib/action_view/template/template.rb index 4145045e2d..abe310b758 100644 --- a/actionpack/lib/action_view/template/template.rb +++ b/actionpack/lib/action_view/template/template.rb @@ -30,12 +30,12 @@ module ActionView # TODO: Figure out how to abstract this def variable_name - identifier[%r'_?(\w+)(\.\w+)*$', 1].to_sym + @variable_name ||= identifier[%r'_?(\w+)(\.\w+)*$', 1].to_sym end # TODO: Figure out how to abstract this def counter_name - "#{variable_name}_counter".to_sym + @counter_name ||= "#{variable_name}_counter".to_sym end # TODO: kill hax |