Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [1310231c15742bf7d99e2f143d88b383c32782d3] by Yehuda Katz

Revision 1310231c15742bf7d99e2f143d88b383c32782d3, committed by Yehuda Katz · August 15th, 2009 @ 08:32 PM

Got tests to pass with some more changes.

  • request.formats is much simpler now
    • For XHRs or Accept headers with a single item, we use the Accept header
    • For other requests, we use params[:format] or fallback to HTML
    • This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser
    • For APIs, we can support single-item Accept headers, which disambiguates from the browsers
  • Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all /, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml". http://github.com/rails/rails/co...

20 changed files

  • R actionpack/test/fixtures/content_type/render_default_content_types_for_respond_to.rhtml
  • M actionpack/lib/action_controller/metal/rendering_controller.rb
  • M actionpack/lib/action_controller/testing/process.rb
  • M actionpack/lib/action_dispatch/http/request.rb
  • M actionpack/lib/action_view/base.rb
  • M actionpack/lib/action_view/helpers/prototype_helper.rb
  • M actionpack/lib/action_view/template/resolver.rb
  • M actionpack/test/controller/content_type_test.rb
  • M actionpack/test/controller/mime_responds_test.rb
  • M actionpack/test/controller/render_js_test.rb
  • M actionpack/test/dispatch/mime_type_test.rb
  • M actionpack/test/dispatch/request_test.rb
  • M actionpack/test/lib/fixture_template.rb
  • M actionpack/test/new_base/content_type_test.rb
  • M actionpack/test/new_base/render_layout_test.rb
  • M actionpack/test/new_base/render_rjs_test.rb
  • M actionpack/test/new_base/render_template_test.rb
  • M actionpack/test/template/javascript_helper_test.rb
  • M actionpack/test/template/prototype_helper_test.rb
  • M actionpack/test/template/render_test.rb