diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-06-09 10:21:30 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-06-09 10:21:30 -0500 |
commit | 233643047104131565467787d0bbc0841bbc77cb (patch) | |
tree | fcea51de79b0cca53b24b2d26fc675fcb5dc933e /actionpack/lib | |
parent | 55791c6c0012d0daea2a75b6a5927f459be25c54 (diff) | |
download | rails-233643047104131565467787d0bbc0841bbc77cb.tar.gz rails-233643047104131565467787d0bbc0841bbc77cb.tar.bz2 rails-233643047104131565467787d0bbc0841bbc77cb.zip |
Removed TemplateFinder.update_extension_cache_for since view path cache will be updated on boot.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/template.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_view/template_finder.rb | 16 |
2 files changed, 1 insertions, 16 deletions
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index 369526188f..a878ac66d9 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -99,7 +99,6 @@ module ActionView #:nodoc: # return the rendered template as a string. def self.register_template_handler(extension, klass) @@template_handlers[extension.to_sym] = klass - TemplateFinder.update_extension_cache_for(extension.to_s) end def self.template_handler_extensions diff --git a/actionpack/lib/action_view/template_finder.rb b/actionpack/lib/action_view/template_finder.rb index cd5e290644..7e9a310810 100644 --- a/actionpack/lib/action_view/template_finder.rb +++ b/actionpack/lib/action_view/template_finder.rb @@ -9,7 +9,6 @@ module ActionView #:nodoc: } class << self #:nodoc: - # This method is not thread safe. Mutex should be used whenever this is accessed from an instance method def process_view_paths(*view_paths) view_paths.flatten.compact.each do |dir| @@ -26,7 +25,7 @@ module ActionView #:nodoc: # Build extension cache extension = file.split(".").last - if template_handler_extensions.include?(extension) + if ActionView::Template.template_handler_extensions.include?(extension) key = file.split(dir).last.sub(/^\//, '').sub(/\.(\w+)$/, '') @@file_extension_cache[dir][key] << extension end @@ -35,19 +34,6 @@ module ActionView #:nodoc: end end - def update_extension_cache_for(extension) - @@processed_view_paths.keys.each do |dir| - Dir.glob("#{dir}/**/*.#{extension}").each do |file| - key = file.split(dir).last.sub(/^\//, '').sub(/\.(\w+)$/, '') - @@file_extension_cache[dir][key] << extension - end - end - end - - def template_handler_extensions - ActionView::Template.template_handler_extensions - end - def reload! view_paths = @@processed_view_paths.keys |