diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-29 21:45:12 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-06-29 21:45:12 +0000 |
commit | 9444206dd5cd254d924335c8c682fa3ded683ac0 (patch) | |
tree | 70125a0f322533ed5f515ae7eed7f643bfbd1572 /actionpack | |
parent | ec432122069501bd84fb99c017dfe42c194e96fc (diff) | |
download | rails-9444206dd5cd254d924335c8c682fa3ded683ac0.tar.gz rails-9444206dd5cd254d924335c8c682fa3ded683ac0.tar.bz2 rails-9444206dd5cd254d924335c8c682fa3ded683ac0.zip |
Retain symbol method key and assign_method_name.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4515 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 8f53230024..0c6d81aa45 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -468,8 +468,13 @@ module ActionView #:nodoc: %w(rxml rjs) end + def assign_method_name(extension, template, file_name) + method_key = file_name || template + @@method_names[method_key] ||= compiled_method_name(extension, template, file_name) + end + def compiled_method_name(extension, template, file_name) - ['_run', extension, compiled_method_name_file_path_segment(file_name)].compact.join('_') + ['_run', extension, compiled_method_name_file_path_segment(file_name)].compact.join('_').to_sym end def compiled_method_name_file_path_segment(file_name) @@ -484,8 +489,7 @@ module ActionView #:nodoc: end def compile_template(extension, template, file_name, local_assigns) - method_key = file_name || template - render_symbol = @@method_names[method_key] ||= compiled_method_name(extension, template, file_name) + render_symbol = assign_method_name(extension, template, file_name) render_source = create_template_source(extension, template, render_symbol, local_assigns.keys) line_offset = @@template_args[render_symbol].size |