public
Rubygem
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
Click here to lend your support to: thin and make a donation at www.pledgie.com !
Support new Rails 2.1.1 method of setting relative_url_root as well as older 
Rails via a respond_to? check
Chris Cherry (author)
Fri Oct 17 11:35:42 -0700 2008
ctcherry (committer)
Fri Oct 17 11:41:09 -0700 2008
commit  b6b0d844c8b82904810ac6cccd1948133d3143f0
tree    d14a57e6a152d474ad5ab1e4466c762866b41c59
parent  0455b8b615471c721cc65af0a4f5944af8192ed8
...
31
32
33
34
 
 
 
 
 
 
 
35
36
37
...
31
32
33
 
34
35
36
37
38
39
40
41
42
43
0
@@ -31,7 +31,13 @@ module Rack
0
         require "#{@root}/config/environment"
0
         require 'dispatcher'
0
         
0
-        ActionController::Base.relative_url_root = @prefix if @prefix
0
+        if @prefix
0
+          if ActionController::Base.respond_to?('relative_url_root=')
0
+            ActionController::Base.relative_url_root = @prefix # Rails 2.1.1
0
+          else
0
+            ActionController::AbstractRequest.relative_url_root = @prefix
0
+          end
0
+        end
0
       end
0
       
0
       # TODO refactor this in File#can_serve?(path) ??

Comments