<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: undefined method &#8216;guard_condition&#8217; when using subdomain_fu on Rails 2.2</title>
	<atom:link href="http://gaskell.org/undefined-method-guard_condition-when-using-subdomain_fu-on-rails-22/feed/" rel="self" type="application/rss+xml" />
	<link>http://gaskell.org/undefined-method-guard_condition-when-using-subdomain_fu-on-rails-22/</link>
	<description>picking up where teh rest leave off</description>
	<lastBuildDate>Tue, 08 Dec 2009 11:48:18 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Christopher</title>
		<link>http://gaskell.org/undefined-method-guard_condition-when-using-subdomain_fu-on-rails-22/comment-page-1/#comment-14309</link>
		<dc:creator>Christopher</dc:creator>
		<pubDate>Sat, 10 Jan 2009 20:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://gaskell.org/?p=110#comment-14309</guid>
		<description>After looking at the optimizations.rb, I figured out, that rails changed the method name of guard_condition to guard_conditions with an array as return value opposed to the string used before.

So I think this code should do the job:
&lt;code&gt;
  module Routing
    module Optimisation
      class PositionalArgumentsWithAdditionalParams
        def guard_conditions_with_subdomains         guard_conditions_without_subdomains &lt;&lt; &quot;!args.last.has_key?(:subdomain)&quot;
        end

        alias_method_chain :guard_conditions, :subdomains
      end
    end
  end
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>After looking at the optimizations.rb, I figured out, that rails changed the method name of guard_condition to guard_conditions with an array as return value opposed to the string used before.</p>
<p>So I think this code should do the job:<br />
<code><br />
  module Routing<br />
    module Optimisation<br />
      class PositionalArgumentsWithAdditionalParams<br />
        def guard_conditions_with_subdomains         guard_conditions_without_subdomains &lt;&lt; "!args.last.has_key?(:subdomain)"<br />
        end</p>
<p>        alias_method_chain :guard_conditions, :subdomains<br />
      end<br />
    end<br />
  end<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.201 seconds -->
