Fixed new_base tests on ruby 1.9

上级 c4a61092
......@@ -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
......
# 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
......
......@@ -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
......
......@@ -12,7 +12,7 @@ def without_layout
end
def with_layout
render :action => "base", :layout => "etag"
render :action => "base", :layout => "etags"
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册