aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base/render.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/base/render.rb')
-rw-r--r--actionpack/lib/action_controller/base/render.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/base/render.rb b/actionpack/lib/action_controller/base/render.rb
index 601c5429c3..4286577ec5 100644
--- a/actionpack/lib/action_controller/base/render.rb
+++ b/actionpack/lib/action_controller/base/render.rb
@@ -378,13 +378,14 @@ module ActionController
# ==== Arguments
# parts<Array[String, Array[Symbol*], String, Boolean]>::
# Example: ["show", [:html, :xml], "users", false]
- def render_for_parts(parts, layout, options = {})
+ def render_for_parts(parts, layout_details, options = {})
parts[1] = {:formats => parts[1], :locales => [I18n.locale]}
tmp = view_paths.find_by_parts(*parts)
- layout = _pick_layout(*layout) unless tmp.exempt_from_layout?
-
+ layout = _pick_layout(*layout_details) unless
+ self.class.exempt_from_layout.include?(tmp.handler)
+
render_for_text(
@template._render_template_with_layout(tmp, layout, options, parts[3]))
end