Fixed new_base tests on ruby 1.9

This commit is contained in:
Yehuda Katz + Carl Lerche
2009-05-20 17:22:29 -07:00
parent c4a6109286
commit c8eda9ade4
4 changed files with 5 additions and 5 deletions

View File

@@ -4,8 +4,8 @@ module ActionController
depends_on AbstractController::Renderer
def initialize(*)
self.formats = [:html]
def process_action(*)
self.formats = request.formats.map {|x| x.to_sym}
super
end

View File

@@ -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

View File

@@ -46,7 +46,7 @@ class Template
end
end
%r'#{Regexp.escape(path)}#{extensions}#{handler_regexp}'
%r'^#{Regexp.escape(path)}#{extensions}#{handler_regexp}$'
end
# TODO: fix me

View File

@@ -12,7 +12,7 @@ module Etags
end
def with_layout
render :action => "base", :layout => "etag"
render :action => "base", :layout => "etags"
end
end