diff options
author | Joshua Peek <josh@joshpeek.com> | 2008-07-12 14:33:46 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-07-12 14:33:46 -0500 |
commit | 73b34e9f75d33dc0709d4ad36c912bdbb8977994 (patch) | |
tree | eea7cb8c3cb428ecfacb6263f4e8f1d903a71824 /actionpack/lib/action_controller/base.rb | |
parent | 30204c4e66cea989c4ee48b52c8827c79e98f14a (diff) | |
download | rails-73b34e9f75d33dc0709d4ad36c912bdbb8977994.tar.gz rails-73b34e9f75d33dc0709d4ad36c912bdbb8977994.tar.bz2 rails-73b34e9f75d33dc0709d4ad36c912bdbb8977994.zip |
Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class.
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 9d9ff527c2..6926941396 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -431,7 +431,7 @@ module ActionController #:nodoc: end def view_paths=(value) - @view_paths = ActionView::ViewLoadPaths.new(Array(value)) if value + @view_paths = ActionView::PathSet.new(Array(value)) if value end # Adds a view_path to the front of the view_paths array. @@ -652,7 +652,7 @@ module ActionController #:nodoc: end def view_paths=(value) - @template.view_paths = ViewLoadPaths.new(value) + @template.view_paths = PathSet.new(value) end # Adds a view_path to the front of the view_paths array. @@ -1248,9 +1248,8 @@ module ActionController #:nodoc: end def template_exempt_from_layout?(template_name = default_template_name) - extension = @template && @template.pick_template_extension(template_name) - name_with_extension = !template_name.include?('.') && extension ? "#{template_name}.#{extension}" : template_name - @@exempt_from_layout.any? { |ext| name_with_extension =~ ext } + template_name = @template.pick_template(template_name).to_s if @template + @@exempt_from_layout.any? { |ext| template_name =~ ext } end def default_template_name(action_name = self.action_name) |