<?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>Sean&#039;s Blog &#187; Ruby on Rails</title>
	<atom:link href="http://seanbehan.com/tag/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Load All ActiveRecord::Base Model Classes in Rails Application</title>
		<link>http://seanbehan.com/programming/load-all-activerecordbase-model-classes-in-rails-application/</link>
		<comments>http://seanbehan.com/programming/load-all-activerecordbase-model-classes-in-rails-application/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 16:26:38 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[active record]]></category>
		<category><![CDATA[classify]]></category>
		<category><![CDATA[constants]]></category>
		<category><![CDATA[initialize]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[rake]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=912</guid>
		<description><![CDATA[Here is a simple rake task which will instantiate all of your Active Record models, provided that they are located in the RAILS_ROOT/app/models directory. Interestingly, all plugin models are instantiated by default when you run the task, for instance, if you are using the Acts As Taggable On plugin, you have access to Tag, Tagging [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fprogramming%2Fload-all-activerecordbase-model-classes-in-rails-application%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Load All ActiveRecord::Base Model Classes in Rails Application" data-url="http://seanbehan.com/programming/load-all-activerecordbase-model-classes-in-rails-application/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Here is a simple rake task which will instantiate all of your Active Record models, provided that they are located in the RAILS_ROOT/app/models directory. Interestingly, all plugin models are instantiated by default when you run the task, for instance, if you are using the Acts As Taggable On plugin, you have access to Tag, Tagging without having to include the plugin models directory path to the task.  </p>
<pre class="wp-code-highlight prettyprint">
namespace :load_ar do
    desc &quot;load up all active record models&quot;
    task :models =&amp;gt; :environment do
      models = ActiveRecord::Base.send(:subclasses)
      Dir[&quot;#{RAILS_ROOT}/app/models/*&quot;].each do |file|
         model = File.basename(file, &quot;.*&quot;).classify
         models &amp;lt;&amp;lt; model unless models.include?(model)
      end
   end
end
</pre>
<p>If your&#8217;re in the console, you can get all the load paths for your Active Record models with the following from the API. </p>
<pre class="wp-code-highlight prettyprint">
Rails.configuration.load_paths.each do |path|
   p path
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/programming/load-all-activerecordbase-model-classes-in-rails-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>David Heinemeier Hansson &#8211; Ruby on Rails, Startups, Culture</title>
		<link>http://seanbehan.com/ruby-on-rails/david-heinemeier-hansson-ruby-on-rails-startups-culture/</link>
		<comments>http://seanbehan.com/ruby-on-rails/david-heinemeier-hansson-ruby-on-rails-startups-culture/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 05:31:55 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[david heinemeier hansson]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=468</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fruby-on-rails%2Fdavid-heinemeier-hansson-ruby-on-rails-startups-culture%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="David Heinemeier Hansson &#8211; Ruby on Rails, Startups, Culture" data-url="http://seanbehan.com/ruby-on-rails/david-heinemeier-hansson-ruby-on-rails-startups-culture/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p><a href="http://seanbehan.com/ruby-on-rails/david-heinemeier-hansson-ruby-on-rails-startups-culture/"><em>Click here to view the embedded video.</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/ruby-on-rails/david-heinemeier-hansson-ruby-on-rails-startups-culture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

