<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Portal Labs Blog</title>
	<atom:link href="http://www.portallabs.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.portallabs.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 03 Dec 2008 16:09:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixing subdomain_fu With Named Routes (Rails 2.2)</title>
		<link>http://www.portallabs.com/blog/2008/12/02/fixing-subdomain_fu-with-named-routes-rails-22/</link>
		<comments>http://www.portallabs.com/blog/2008/12/02/fixing-subdomain_fu-with-named-routes-rails-22/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 19:52:09 +0000</pubDate>
		<dc:creator>Jacob Coby</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://www.portallabs.com/blog/?p=18</guid>
		<description><![CDATA[We recently upgraded our project that was using subdomain_fu to rails 2.2 and the previous fix no longer works.
Turns out the solution is even easier in rails 2.2 than 2.1.  Open up lib/subdomain_fu/routing_extensions.rb and put this bit of code at the very bottom:


ActionController::UrlRewriter::RESERVED_OPTIONS &#60;&#60; :subdomain

Is this the correct way?  Doesn&#8217;t seem to be [...]]]></description>
			<content:encoded><![CDATA[<p>We recently upgraded our project that was using subdomain_fu to rails 2.2 and <a href="http://www.portallabs.com/blog/2008/10/22/fixing-subdomain_fu-with-named-routes/">the previous fix</a> no longer works.</p>
<p>Turns out the solution is even easier in rails 2.2 than 2.1.  Open up lib/subdomain_fu/routing_extensions.rb and put this bit of code at the very bottom:</p>
<pre name="code" class="ruby">

ActionController::UrlRewriter::RESERVED_OPTIONS &lt;&lt; :subdomain
</pre>
<p>Is this the correct way?  Doesn&#8217;t seem to be since we&#8217;re modifying a &#8220;constant&#8221;, but it seems to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.portallabs.com/blog/2008/12/02/fixing-subdomain_fu-with-named-routes-rails-22/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Free Wordpress Theme: WP-PortalTheme</title>
		<link>http://www.portallabs.com/blog/2008/11/27/wp-portaltheme/</link>
		<comments>http://www.portallabs.com/blog/2008/11/27/wp-portaltheme/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 17:34:52 +0000</pubDate>
		<dc:creator>Jason Chance</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[2-column]]></category>
		<category><![CDATA[fixed width]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[wp-portaltheme]]></category>

		<guid isPermaLink="false">http://www.portallabs.com/blog/?p=15</guid>
		<description><![CDATA[WP-PortalTheme Orange is the first free theme released by Portal Labs.  It is a lightweight, XHTML Valid, 2-column, fixed width theme in a pretty shade of orange (our signature color).
It is widget ready and features a 2&#215;2 ad block in the right sidebar for up to 4 125&#215;125 banner ads.
In future versions we plan [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.portallabs.com/blog/wp-content/themes/wp-portaltheme-orange/screenshot.png" alt="WP-PortalTheme Orange" class="alignright"/>WP-PortalTheme Orange is the first free theme released by Portal Labs.  It is a lightweight, XHTML Valid, 2-column, fixed width theme in a pretty shade of orange (our signature color).</p>
<p>It is widget ready and features a 2&#215;2 ad block in the right sidebar for up to 4 125&#215;125 banner ads.</p>
<p>In future versions we plan to include a theme options page with color scheme picker and an assortment of additional color schemes complete with header graphic and styles.</p>
<p>Check out the live theme preview and download it at the Wordpress Themes directory:  <a href="http://wordpress.org/extend/themes/wp-portaltheme-orange">WP-PortalTheme Orange Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.portallabs.com/blog/2008/11/27/wp-portaltheme/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Fixing subdomain_fu With Named Routes</title>
		<link>http://www.portallabs.com/blog/2008/10/22/fixing-subdomain_fu-with-named-routes/</link>
		<comments>http://www.portallabs.com/blog/2008/10/22/fixing-subdomain_fu-with-named-routes/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 16:19:06 +0000</pubDate>
		<dc:creator>Jacob Coby</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://www.portallabs.com/blog/?p=8</guid>
		<description><![CDATA[subdomain_fu is a great little plugin for rails to make managing multiple subdomains easier.  Watch the railscast and try it out for yourself.
Unfortunately, it didn&#8217;t handle named routes with the :subdomain parameter correctly.  You can learn more about this bug over at the subdomain_fu lighthouse bug tracker.  The ticket has been open for several months [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/mbleigh/subdomain-fu/tree/master" target="_blank">subdomain_fu</a> is a great little plugin for rails to make managing multiple subdomains easier.  <a href="http://railscasts.com/episodes/123-subdomains" target="_blank">Watch the railscast</a> and try it out for yourself.</p>
<p>Unfortunately, it didn&#8217;t handle named routes with the :subdomain parameter correctly.  You can learn more about this bug over at the subdomain_fu <a href="http://mbleigh.lighthouseapp.com/projects/13148/tickets/8-improper-generated-urls-with-named-routes-for-a-singular-resource" target="_blank">lighthouse bug tracker</a>.  The ticket has been open for several months now with no hint at a solution coming anytime soon.</p>
<p>The fix is pretty simple.  Kudos go to <a href="http://mbleigh.lighthouseapp.com/projects/13148/tickets/4-route-optimization-interfering-with-s_f" target="_blank">ticket #4</a> for the solution.  Open up vendor/plugins/subdomain-fu/lib/subdomain_fu/url_rewriter.rb and add the following to the bottom of the ActionController module:</p>
<pre name="code" class="ruby">

module Routing
    module Optimisation
      class PositionalArgumentsWithAdditionalParams
        def guard_condition_with_subdomains
          # don&#039;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
      end
    end
  end
</pre>
<p>Restart your rails server and everything should start to work correctly for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.portallabs.com/blog/2008/10/22/fixing-subdomain_fu-with-named-routes/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
