diff options
Diffstat (limited to 'actionpack/lib/action_controller/new_base')
-rw-r--r-- | actionpack/lib/action_controller/new_base/layouts.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/new_base/renderer.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/new_base/layouts.rb b/actionpack/lib/action_controller/new_base/layouts.rb index a8e0809ac6..79abe40389 100644 --- a/actionpack/lib/action_controller/new_base/layouts.rb +++ b/actionpack/lib/action_controller/new_base/layouts.rb @@ -13,7 +13,7 @@ module ActionController # render :text => ..., :layout => ... # or # render :anything_else - if !options.key?(:text) || options.key?(:layout) + if (!options.key?(:text) && !options.key?(:inline)) || options.key?(:layout) options[:_layout] = options.key?(:layout) ? _layout_for_option(options[:layout]) : _default_layout end diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index f21fd746b7..4c4a74979b 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -17,6 +17,10 @@ module ActionController if options.key?(:text) options[:_template] = ActionView::TextTemplate.new(_text(options)) template = nil + elsif options.key?(:inline) + handler = ActionView::Template.handler_class_for_extension(options[:type] || "erb") + template = ActionView::Template.new(options[:inline], "inline #{options[:inline].inspect}", handler, {}) + options[:_template] = template elsif options.key?(:template) options[:_template_name] = options[:template] elsif options.key?(:action) |