Permalink
Browse files

Revert "Name compiled render methods". This caused several failures o…

…n AP test suite for 1.9.2.

This reverts commit 2c4f8aa.
  • Loading branch information...
1 parent 093c4ee commit 9013227e00895ac95f29077229ec2fb156f450b0 @josevalim josevalim committed Jun 29, 2010
Showing with 8 additions and 11 deletions.
  1. +8 −11 actionpack/lib/action_view/template.rb
@@ -156,12 +156,11 @@ def counter_name
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 @@ def #{method_name}(local_assigns)
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

0 comments on commit 9013227

Please sign in to comment.