1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Just change the formats on first render, closes #5307, closes #5308.

This commit is contained in:
José Valim 2012-03-07 14:55:06 +01:00
parent e6e591dffc
commit bbdb54ad15

View file

@ -6,8 +6,13 @@ module ActionView
@view = context
@details = extract_details(options)
template = determine_template(options)
@lookup_context.rendered_format ||= template.formats.first
@lookup_context.formats = template.formats
context = @lookup_context
unless context.rendered_format
context.rendered_format = template.formats.first
context.formats = template.formats
end
render_template(template, options[:layout], options[:locals])
end