diff options
author | José Valim <jose.valim@gmail.com> | 2010-06-29 10:54:07 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-29 10:54:07 +0200 |
commit | 9013227e00895ac95f29077229ec2fb156f450b0 (patch) | |
tree | 398cdf274e30a849c1722a84bebd0da3b479d60a /actionpack/lib/action_view | |
parent | 093c4eedd0296b6297ab4359d7d873cdf0daf43e (diff) | |
download | rails-9013227e00895ac95f29077229ec2fb156f450b0.tar.gz rails-9013227e00895ac95f29077229ec2fb156f450b0.tar.bz2 rails-9013227e00895ac95f29077229ec2fb156f450b0.zip |
Revert "Name compiled render methods". This caused several failures on AP test suite for 1.9.2.
This reverts commit 2c4f8aae5ca8489bb3e47712f50b3f57015811d9.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 103b625a99..c00557209b 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -156,12 +156,11 @@ module ActionView end def inspect - @inspect ||= - if defined?(Rails.root) - identifier.sub("#{Rails.root}/", '') - else - identifier - end + if defined?(Rails.root) + identifier.sub("#{Rails.root}/", '') + else + identifier + end end private @@ -268,11 +267,9 @@ module ActionView end def build_method_name(locals) - @method_names[locals.keys.hash] ||= "#{identifier_method_name}__#{@identifier.hash}_#{__id__}_#{locals.keys.hash}".gsub('-', "_") - end - - def identifier_method_name - @identifier_method_name ||= inspect.gsub(/[^a-z_]/, '_') + # TODO: is locals.keys.hash reliably the same? + @method_names[locals.keys.hash] ||= + "_render_template_#{@identifier.hash}_#{__id__}_#{locals.keys.hash}".gsub('-', "_") end end end |