diff options
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 9 | ||||
-rw-r--r-- | actionpack/lib/action_view/base.rb | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 2e0d554a55..91ebc7e69d 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -471,7 +471,14 @@ module ActionController #:nodoc: render(options.merge({ :file => options[:template], :use_full_path => true })) elsif options[:inline] - render(options.merge({ :text => @template.render_template(options[:type] || :rhtml, options[:inline]) })) + render(options.merge({ + :text => + @template.render_template( + options[:type] || :rhtml, + options[:inline], + options[:locals] || {} + ) + })) elsif options[:action] render(options.merge({ :template => default_template_name(options[:action]) })) diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 9a4e00057a..b6df4ba917 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -194,8 +194,10 @@ module ActionView #:nodoc: render_file(options[:file], options[:use_full_path], options[:locals]) elsif options[:partial] && options[:collection] render_partial_collection(options[:partial], options[:collection], options[:spacer_template], options[:locals]) - elsif options.is_a?(Hash) && options[:partial] + elsif options[:partial] render_partial(options[:partial], options[:object], options[:locals]) + elsif options[:inline] + render_template(options[:type] || :rhtml, options[:inline], options[:locals] || {}) end end end |