<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>I.NFECTIO.US: Autoload Support for Models in Subdirectories Removed</title>
    <link>http://i.nfectio.us/articles/2006/09/07/autoload-support-for-models-in-subdirectories-removed</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>"Nothing in life is worth doing if you have no life while doing it"</description>
    <item>
      <title>Autoload Support for Models in Subdirectories Removed</title>
      <description>The auto loading path which make models in subdirectories of app/models load in Rails has been removed from the lastest trunk. If you are using models in subdirectories of the app/models path, you will now need to add this in your environment.rb:
&lt;br /&gt;
&lt;pre&gt;
config.autoload_paths += Dir[RAILS_ROOT + '/app/models/*/']
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;
This won't affect most users, but if you've organized your models into subdirectories similar to the convention used for namespaces controllers, then you will want to update your applications before you move to 1.2.
&lt;br /&gt;&lt;br /&gt;
Specifically, the following path was removed:
&lt;br /&gt;
&lt;pre&gt;
#{root_path}/app/models/[_a-z]*"]
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;</description>
      <pubDate>Thu, 07 Sep 2006 17:09:00 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:ec78334f-9f4b-4d3d-8bb6-11c1002dccd9</guid>
      <author>Bob Silva</author>
      <link>http://i.nfectio.us/articles/2006/09/07/autoload-support-for-models-in-subdirectories-removed</link>
      <category>Ruby on Rails</category>
      <category>rails</category>
    </item>
    <item>
      <title>"Autoload Support for Models in Subdirectories Removed" by Scatman Dan</title>
      <description>I've just had a got with this, and in my installation at least (Rails 1.2.1), the correct syntax was -- config.load_paths += Dir[RAILS_ROOT + '/app/models/*/'] -- Note that it was load_paths, not autoload_paths.</description>
      <pubDate>Fri, 26 Jan 2007 02:45:15 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:2536ffa8-47cb-4ce9-ad8a-fa6d7d8928d5</guid>
      <link>http://i.nfectio.us/articles/2006/09/07/autoload-support-for-models-in-subdirectories-removed#comment-252</link>
    </item>
    <item>
      <title>"Autoload Support for Models in Subdirectories Removed" by Scatman Dan</title>
      <description>But &lt;em&gt;why&lt;/em&gt;? Ah well, thanks for mentioning it.</description>
      <pubDate>Fri, 26 Jan 2007 02:29:12 -0800</pubDate>
      <guid isPermaLink="false">urn:uuid:83f6f8a3-73e5-4afa-b811-0b64de7d711d</guid>
      <link>http://i.nfectio.us/articles/2006/09/07/autoload-support-for-models-in-subdirectories-removed#comment-251</link>
    </item>
    <item>
      <title>"Autoload Support for Models in Subdirectories Removed" by Ulysses</title>
      <description>*rolls eyes*</description>
      <pubDate>Wed, 11 Oct 2006 20:48:12 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:860729e7-2bf9-4e9c-8e89-ef7bb4f12368</guid>
      <link>http://i.nfectio.us/articles/2006/09/07/autoload-support-for-models-in-subdirectories-removed#comment-190</link>
    </item>
    <item>
      <title>"Autoload Support for Models in Subdirectories Removed" by Ulysses</title>
      <description>*rolls eyes*</description>
      <pubDate>Wed, 11 Oct 2006 20:48:02 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:44911a7d-0cb2-47a1-b78d-0711212806f5</guid>
      <link>http://i.nfectio.us/articles/2006/09/07/autoload-support-for-models-in-subdirectories-removed#comment-189</link>
    </item>
    <item>
      <title>"Autoload Support for Models in Subdirectories Removed" by Chris</title>
      <description>For shame.  Thanks for pointing this out.</description>
      <pubDate>Fri, 08 Sep 2006 09:47:32 -0700</pubDate>
      <guid isPermaLink="false">urn:uuid:2d2c54b7-535c-4875-bc1b-ecfd62b3cebf</guid>
      <link>http://i.nfectio.us/articles/2006/09/07/autoload-support-for-models-in-subdirectories-removed#comment-129</link>
    </item>
  </channel>
</rss>
