<?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: Dynamically adding routes from your engine plugins</title>
	<atom:link href="http://yanpritzker.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://yanpritzker.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/</link>
	<description>photographer, entrepreneur, software engineer, musician, skier</description>
	<lastBuildDate>Mon, 14 May 2012 16:09:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: james dot schumann &#187; links for 2007-03-28</title>
		<link>http://yanpritzker.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/comment-page-1/#comment-3286</link>
		<dc:creator>james dot schumann &#187; links for 2007-03-28</dc:creator>
		<pubDate>Wed, 28 Mar 2007 15:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://skwpspace.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/#comment-3286</guid>
		<description>[...] Dynamically adding routes from your engine plugins at skwpspace.com (tags: rails development) [...]</description>
		<content:encoded><![CDATA[<p>[...] Dynamically adding routes from your engine plugins at skwpspace.com (tags: rails development) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yan</title>
		<link>http://yanpritzker.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/comment-page-1/#comment-3285</link>
		<dc:creator>Yan</dc:creator>
		<pubDate>Wed, 28 Mar 2007 15:17:02 +0000</pubDate>
		<guid isPermaLink="false">http://skwpspace.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/#comment-3285</guid>
		<description>Good point James, I think I overhacked the solution on this one. Will try your method.

I didn&#039;t know about Rails.plugins..that&#039;s pretty nice. But in actuality what I didn&#039;t show in my code is that PLUGINS is a special list of plugins that I have prefiltered since they are the application specific dropins rather than any old plugin that might exist.</description>
		<content:encoded><![CDATA[<p>Good point James, I think I overhacked the solution on this one. Will try your method.</p>
<p>I didn&#8217;t know about Rails.plugins..that&#8217;s pretty nice. But in actuality what I didn&#8217;t show in my code is that PLUGINS is a special list of plugins that I have prefiltered since they are the application specific dropins rather than any old plugin that might exist.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Adam</title>
		<link>http://yanpritzker.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/comment-page-1/#comment-3283</link>
		<dc:creator>James Adam</dc:creator>
		<pubDate>Wed, 28 Mar 2007 10:42:17 +0000</pubDate>
		<guid isPermaLink="false">http://skwpspace.com/2007/03/27/dynamically-adding-routes-from-your-engine-plugins/#comment-3283</guid>
		<description>Why not try this?

  Dir[&quot;#{RAILS_ROOT}/vendor/plugins/*&quot;].each do &#124;plugin_dir&#124;
    map.from_plugin(File.basename(plugin_dir))
  end


.. it should work, and using the API should protect you against any changes to the way that plugin routes are implemented. Ideally you&#039;d be able to run

  Rails.plugins.each do &#124;plugin&#124;
    map.from_plugin(plugin.name)
  end

but this will only work if you *aren&#039;t* using the 

  config.plugins = %w(engines *)

loading style, since all other plugins will be loaded during the &quot;after_initialize&quot; hook and so won&#039;t be present in Rails.plugins.

HTH,

James</description>
		<content:encoded><![CDATA[<p>Why not try this?</p>
<p>  Dir["#{RAILS_ROOT}/vendor/plugins/*"].each do |plugin_dir|<br />
    map.from_plugin(File.basename(plugin_dir))<br />
  end</p>
<p>.. it should work, and using the API should protect you against any changes to the way that plugin routes are implemented. Ideally you&#8217;d be able to run</p>
<p>  Rails.plugins.each do |plugin|<br />
    map.from_plugin(plugin.name)<br />
  end</p>
<p>but this will only work if you *aren&#8217;t* using the </p>
<p>  config.plugins = %w(engines *)</p>
<p>loading style, since all other plugins will be loaded during the &#8220;after_initialize&#8221; hook and so won&#8217;t be present in Rails.plugins.</p>
<p>HTH,</p>
<p>James</p>
]]></content:encoded>
	</item>
</channel>
</rss>

