aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-05-15 06:36:34 +0000
committerRick Olson <technoweenie@gmail.com>2007-05-15 06:36:34 +0000
commitebf9b3737b9470c2fbedf39ac5cd5a4cba81afc1 (patch)
tree22e53d823c94c0e351c07bf94dadb4f4744ce9f4 /actionpack/lib/action_controller
parentfa3618d3753b5591ed19d98d52c55716d814e34a (diff)
downloadrails-ebf9b3737b9470c2fbedf39ac5cd5a4cba81afc1.tar.gz
rails-ebf9b3737b9470c2fbedf39ac5cd5a4cba81afc1.tar.bz2
rails-ebf9b3737b9470c2fbedf39ac5cd5a4cba81afc1.zip
Add some performance enhancements to ActionView.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/base.rb4
-rw-r--r--actionpack/lib/action_controller/layout.rb1
2 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index c922dc7284..e3b52278ba 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -1213,14 +1213,14 @@ module ActionController #:nodoc:
end
def template_exempt_from_layout?(template_name = default_template_name)
- extension = @template.pick_template_extension(template_name) rescue nil
+ extension = @template && @template.pick_template_extension(template_name)
name_with_extension = !template_name.include?('.') && extension ? "#{template_name}.#{extension}" : template_name
extension == :rjs || @@exempt_from_layout.any? { |ext| name_with_extension =~ ext }
end
def assert_existence_of_template_file(template_name)
unless template_exists?(template_name) || ignore_missing_templates
- full_template_path = template_name.include?('.') ? template_name : @template.send(:full_template_path, template_name, "#{@template.send(:template_format)}.erb")
+ full_template_path = template_name.include?('.') ? template_name : @template.full_template_path(template_name, "#{@template.template_format}.erb")
template_type = (template_name =~ /layouts/i) ? 'layout' : 'template'
raise(MissingTemplate, "Missing #{template_type} #{full_template_path}")
end
diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb
index 7de66cd66e..860d7b383c 100644
--- a/actionpack/lib/action_controller/layout.rb
+++ b/actionpack/lib/action_controller/layout.rb
@@ -214,7 +214,6 @@ module ActionController #:nodoc:
# weblog/standard, but <tt>layout "standard"</tt> will return layouts/standard.
def active_layout(passed_layout = nil)
layout = passed_layout || self.class.default_layout
-
active_layout = case layout
when String then layout
when Symbol then send(layout)