diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index 276816a6f55b747313201135bb301e48666ac903..61762129709decf18a300a2de14aaf59eb170c01 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -4,8 +4,8 @@ module Renderer depends_on AbstractController::Renderer - def initialize(*) - self.formats = [:html] + def process_action(*) + self.formats = request.formats.map {|x| x.to_sym} super end diff --git a/actionpack/lib/action_dispatch/http/mime_types.rb b/actionpack/lib/action_dispatch/http/mime_types.rb index 2d7fba1173c4268bc63c6d7f1060d00a0e0586f3..7c28cac4196708df7594e0d8b82083437b407833 100644 --- a/actionpack/lib/action_dispatch/http/mime_types.rb +++ b/actionpack/lib/action_dispatch/http/mime_types.rb @@ -1,9 +1,9 @@ # Build list of Mime types for HTTP responses # http://www.iana.org/assignments/media-types/ +Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml ) Mime::Type.register "*/*", :all Mime::Type.register "text/plain", :text, [], %w(txt) -Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml ) Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript ) Mime::Type.register "text/css", :css Mime::Type.register "text/calendar", :ics diff --git a/actionpack/test/lib/fixture_template.rb b/actionpack/test/lib/fixture_template.rb index e43e329a9eb9fd4c6447a17791cdc9b83f5f63a8..59fb6819edc3c631fb6442698ec8af26017665df 100644 --- a/actionpack/test/lib/fixture_template.rb +++ b/actionpack/test/lib/fixture_template.rb @@ -46,7 +46,7 @@ def details_to_regexp(name, details, prefix, partial) end end - %r'#{Regexp.escape(path)}#{extensions}#{handler_regexp}' + %r'^#{Regexp.escape(path)}#{extensions}#{handler_regexp}$' end # TODO: fix me diff --git a/actionpack/test/new_base/etag_test.rb b/actionpack/test/new_base/etag_test.rb index c77636bb64b55f652823f05bcab03a54592cc66b..a40d3c936aeca3dcbadbd0fc5037e3ee8dc0ddd7 100644 --- a/actionpack/test/new_base/etag_test.rb +++ b/actionpack/test/new_base/etag_test.rb @@ -12,7 +12,7 @@ def without_layout end def with_layout - render :action => "base", :layout => "etag" + render :action => "base", :layout => "etags" end end