aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-05 23:54:11 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-05 23:54:11 -0500
commit9828aecd2aa98910f17e4b0f52519f4727d198d8 (patch)
tree1aa9d6ff3764a6fca9eae35756d041f643af667e /actionpack/lib/action_view/template.rb
parentce5d958f8fe878465c0d2142991a2945ca8d3cd1 (diff)
downloadrails-9828aecd2aa98910f17e4b0f52519f4727d198d8.tar.gz
rails-9828aecd2aa98910f17e4b0f52519f4727d198d8.tar.bz2
rails-9828aecd2aa98910f17e4b0f52519f4727d198d8.zip
Lookup compiled methods in CompiledTemplates instance methods set instead of using a "methods_names" hash
Diffstat (limited to 'actionpack/lib/action_view/template.rb')
-rw-r--r--actionpack/lib/action_view/template.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb
index 56d740f478..069d7d57af 100644
--- a/actionpack/lib/action_view/template.rb
+++ b/actionpack/lib/action_view/template.rb
@@ -19,7 +19,7 @@ module ActionView #:nodoc:
set_extension_and_file_name
- @method_key = @filename
+ @method_segment = compiled_method_name_file_path_segment
@locals = locals || {}
@handler = self.class.handler_class_for_extension(@extension).new(@view)
end
@@ -72,7 +72,7 @@ module ActionView #:nodoc:
raise MissingTemplate, "Missing #{template_type} #{full_template_path} in view path #{display_paths}"
end
- def method_name_path_segment
+ def compiled_method_name_file_path_segment
s = File.expand_path(@filename)
s.sub!(/^#{Regexp.escape(File.expand_path(RAILS_ROOT))}/, '') if defined?(RAILS_ROOT)
s.gsub!(/([^a-zA-Z0-9_])/) { $1.ord }