Skip to content

Commit

Permalink
Revert "Name compiled render methods". This caused several failures o…
Browse files Browse the repository at this point in the history
…n AP test suite for 1.9.2.

This reverts commit 2c4f8aa.
  • Loading branch information
josevalim committed Jun 29, 2010
1 parent 093c4ee commit 9013227
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions actionpack/lib/action_view/template.rb
Expand Up @@ -156,12 +156,11 @@ def counter_name
end end


def inspect def inspect
@inspect ||= if defined?(Rails.root)
if defined?(Rails.root) identifier.sub("#{Rails.root}/", '')
identifier.sub("#{Rails.root}/", '') else
else identifier
identifier end
end
end end


private private
Expand Down Expand Up @@ -268,11 +267,9 @@ def #{method_name}(local_assigns)
end end


def build_method_name(locals) def build_method_name(locals)
@method_names[locals.keys.hash] ||= "#{identifier_method_name}__#{@identifier.hash}_#{__id__}_#{locals.keys.hash}".gsub('-', "_") # TODO: is locals.keys.hash reliably the same?
end @method_names[locals.keys.hash] ||=

"_render_template_#{@identifier.hash}_#{__id__}_#{locals.keys.hash}".gsub('-', "_")
def identifier_method_name
@identifier_method_name ||= inspect.gsub(/[^a-z_]/, '_')
end end
end end
end end

0 comments on commit 9013227

Please sign in to comment.