mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
parent
c82fd8fc2a
commit
f0268d56af
2 changed files with 3 additions and 2 deletions
|
@ -9,8 +9,8 @@ module ActionView
|
|||
context = @lookup_context
|
||||
|
||||
unless context.rendered_format
|
||||
context.rendered_format = template.formats.first
|
||||
context.formats = template.formats
|
||||
context.formats = template.formats unless template.formats.empty?
|
||||
context.rendered_format = context.formats.first
|
||||
end
|
||||
|
||||
render_template(template, options[:layout], options[:locals])
|
||||
|
|
|
@ -1022,6 +1022,7 @@ class RenderTest < ActionController::TestCase
|
|||
def test_accessing_local_assigns_in_inline_template
|
||||
get :accessing_local_assigns_in_inline_template, :local_name => "Local David"
|
||||
assert_equal "Goodbye, Local David", @response.body
|
||||
assert_equal "text/html", @response.content_type
|
||||
end
|
||||
|
||||
def test_should_implicitly_render_html_template_from_xhr_request
|
||||
|
|
Loading…
Reference in a new issue