<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -31,4 +31,9 @@ end
 
 ActionController::Routing::RouteSet.send :include, SubdomainFu::RouteSetExtensions
 ActionController::Routing::Route.send :include, SubdomainFu::RouteExtensions
-ActionController::UrlRewriter::RESERVED_OPTIONS &lt;&lt; :subdomain
\ No newline at end of file
+
+# UrlRewriter::RESERVED_OPTIONS is only available in Rails &gt;= 2.2
+# http://www.portallabs.com/blog/2008/12/02/fixing-subdomain_fu-with-named-routes-rails-22/
+if Rails::VERSION::MAJOR &gt;= 2 and Rails::VERSION::MINOR &gt;= 2
+  ActionController::UrlRewriter::RESERVED_OPTIONS &lt;&lt; :subdomain
+end
\ No newline at end of file</diff>
      <filename>lib/subdomain_fu/routing_extensions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,18 +27,20 @@ module ActionController
     alias_method_chain :rewrite_url, :subdomains
   end
   
-  # hack for http://www.portallabs.com/blog/?p=8
-  module Routing
-    module Optimisation
-      class PositionalArgumentsWithAdditionalParams
-        def guard_condition_with_subdomains
-          # don't allow optimisation if a subdomain is present - fixes a problem
-          # with the subdomain appearing in the query instead of being rewritten
-          # see http://mbleigh.lighthouseapp.com/projects/13148/tickets/8-improper-generated-urls-with-named-routes-for-a-singular-resource
-          guard_condition_without_subdomains + &quot; &amp;&amp; !args.last.has_key?(:subdomain)&quot;
-        end
+  if Rails::VERSION::MAJOR &gt;= 2 and Rails::VERSION::MINOR &lt;= 1
+    # hack for http://www.portallabs.com/blog/2008/10/22/fixing-subdomain_fu-with-named-routes/
+    module Routing
+      module Optimisation
+        class PositionalArgumentsWithAdditionalParams
+          def guard_condition_with_subdomains
+            # don't allow optimisation if a subdomain is present - fixes a problem
+            # with the subdomain appearing in the query instead of being rewritten
+            # see http://mbleigh.lighthouseapp.com/projects/13148/tickets/8-improper-generated-urls-with-named-routes-for-a-singular-resource
+            guard_condition_without_subdomains + &quot; &amp;&amp; !args.last.has_key?(:subdomain)&quot;
+          end
 
-        alias_method_chain :guard_condition, :subdomains
+          alias_method_chain :guard_condition, :subdomains
+        end
       end
     end
   end</diff>
      <filename>lib/subdomain_fu/url_rewriter.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>81c2a9ce5bb54de7888d31d94cf060b253edb7ae</id>
    </parent>
  </parents>
  <author>
    <name>Jacob Coby</name>
    <email>jcoby@portallabs.com</email>
  </author>
  <url>http://github.com/mbleigh/subdomain-fu/commit/483704e8129da0afd8d4e02f3fc7e02ef8e30d70</url>
  <id>483704e8129da0afd8d4e02f3fc7e02ef8e30d70</id>
  <committed-date>2009-01-12T07:31:06-08:00</committed-date>
  <authored-date>2009-01-09T11:28:27-08:00</authored-date>
  <message>added conditionals around rails 2.x and 2.2 subdomain hacks.

Signed-off-by: Michael Bleigh &lt;michael@intridea.com&gt;</message>
  <tree>041f63b7d40f88feadb884885ddeab585f3711a7</tree>
  <committer>
    <name>Michael Bleigh</name>
    <email>michael@intridea.com</email>
  </committer>
</commit>
