aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-xactionpack/lib/action_controller/base.rb2
-rw-r--r--actionpack/lib/action_controller/layout.rb10
2 files changed, 5 insertions, 7 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 0e2f87b468..b5983f0e90 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -490,7 +490,7 @@ module ActionController #:nodoc:
render(options.merge({ :text => "" }))
else
- render(options.merge({ :template => default_template_name }))
+ render(options.merge({ :action => action_name }))
end
end
diff --git a/actionpack/lib/action_controller/layout.rb b/actionpack/lib/action_controller/layout.rb
index 52b02f851d..237e274173 100644
--- a/actionpack/lib/action_controller/layout.rb
+++ b/actionpack/lib/action_controller/layout.rb
@@ -220,12 +220,10 @@ module ActionController #:nodoc:
private
def render_with_a_layout_options(options)
return options unless options.is_a?(Hash)
- case
- when options[:text], options[:partial], options[:nothing], options[:inline]
- # by default, :text, :partial, :inline, and :nothing never use a layout
- { :layout => false }.merge(options)
- else
+ if options.values_at(:text, :file, :template, :inline, :partial, :nothing).compact.empty?
options
+ else
+ { :layout => false }.merge(options)
end
end
@@ -236,7 +234,7 @@ module ActionController #:nodoc:
case options[:layout]
when FalseClass
nil
- when NilClass
+ when NilClass, TrueClass
active_layout if action_has_layout?
else
active_layout(options[:layout])