<?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>This Orange &#187; rails</title>
	<atom:link href="http://blog.thisorange.com/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thisorange.com</link>
	<description>So Very Orange</description>
	<lastBuildDate>Tue, 24 Jan 2012 23:30:14 +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>formating the ruby &#8211; rails console</title>
		<link>http://blog.thisorange.com/2009/10/28/formating-the-ruby-rails-console/</link>
		<comments>http://blog.thisorange.com/2009/10/28/formating-the-ruby-rails-console/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 02:45:02 +0000</pubDate>
		<dc:creator>Pheonix7284</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.thisorange.com/?p=78</guid>
		<description><![CDATA[So now that I got the ruby console working, when you get output it&#8217;s just a big stream of text, and very hard to read separate results, and just a plain PITA. This: http://github.com/cldwalker/hirb#readme Does some excellent formating, comes with the default view enabled, but if you want to make your own configurations you can.]]></description>
			<content:encoded><![CDATA[<p>So now that I got the ruby console working, when you get output it&#8217;s just a big stream of text, and very hard to read separate results, and just a plain PITA.</p>
<p>This: <a title="link to external site" href="http://github.com/cldwalker/hirb#readme" target="_blank">http://github.com/cldwalker/hirb#readme</a></p>
<p>Does some excellent formating, comes with the default view enabled, but if you want to make your own configurations you can.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thisorange.com/2009/10/28/formating-the-ruby-rails-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rails console errors on start &#8220;`require&#8217;: no such file to load &#8212; readline (LoadError)&#8221;</title>
		<link>http://blog.thisorange.com/2009/10/28/rails-console-errors-on-start-require-no-such-file-to-load-readline-loaderror/</link>
		<comments>http://blog.thisorange.com/2009/10/28/rails-console-errors-on-start-require-no-such-file-to-load-readline-loaderror/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 20:07:42 +0000</pubDate>
		<dc:creator>Pheonix7284</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[Work]]></category>
		<category><![CDATA[bugfixes]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.thisorange.com/?p=74</guid>
		<description><![CDATA[I was getting this: Loading development environment (Rails 2.3.2) /usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require&#8217;: no such file to load &#8212; readline (LoadError) from /usr/local/lib/ruby/1.8/irb/completion.rb:10 from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require&#8217; from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules&#8217; from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each&#8217; from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules&#8217; from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup&#8217; from /usr/local/lib/ruby/1.8/irb.rb:54:in `start&#8217; from /usr/local/bin/irb:13 Whenever I tried to use the console.  Some helpfull google searching got me this: [...]]]></description>
			<content:encoded><![CDATA[<p>I was getting this:</p>
<blockquote><p>Loading development environment (Rails 2.3.2)<br />
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require&#8217;: no such file to load &#8212; readline (LoadError)<br />
from /usr/local/lib/ruby/1.8/irb/completion.rb:10<br />
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require&#8217;<br />
from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules&#8217;<br />
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each&#8217;<br />
from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules&#8217;<br />
from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup&#8217;<br />
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start&#8217;<br />
from /usr/local/bin/irb:13</p></blockquote>
<p>Whenever I tried to use the console.  Some helpfull google searching got me this:<br />
<a title="external blog" href="http://dirk.net/2009/04/05/no-such-file-to-load-readline-loaderror-when-running-scriptconsole/" target="_blank">http://dirk.net/2009/04/05/no-such-file-to-load-readline-loaderror-when-running-scriptconsole/</a></p>
<p>Which worked wonders.</p>
<p>I  also caught that I pretty much stick everything I&#8217;ve added to my work comp in my home directory.  I have no time for basic organization apparently.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thisorange.com/2009/10/28/rails-console-errors-on-start-require-no-such-file-to-load-readline-loaderror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>has_many :through or has_and_belongs_to_many?</title>
		<link>http://blog.thisorange.com/2009/07/24/has_many-through-or-has_and_belongs_to_many/</link>
		<comments>http://blog.thisorange.com/2009/07/24/has_many-through-or-has_and_belongs_to_many/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 19:09:38 +0000</pubDate>
		<dc:creator>Pheonix7284</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[has_many]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.thisorange.com/?p=45</guid>
		<description><![CDATA[I have several data models that don&#8217;t directly know about each other, but need to be connected somehow so results of the opposite type can be returned when searching against the first. But which method to use? Lets see: has_and_belongs_to_many make a reference table of only foreign keys &#8211; no other attributes(? used to but [...]]]></description>
			<content:encoded><![CDATA[<p>I have several data models that don&#8217;t directly know about each other, but need to be connected somehow so results of the opposite type can be returned when searching against the first. But which method to use?</p>
<p>Lets see:</p>
<p>has_and_belongs_to_many</p>
<ul>
<li> make a reference table of only foreign keys &#8211; no other attributes(? used to but deprecated)</li>
<li>no extra models &#8211; Just link to the opposite class from the both models.</li>
<li>connected via a table</li>
<li>can only join two models</li>
</ul>
<p>has_many :through</p>
<ul>
<li>make a table with your two ids, and other attributes (editable?)</li>
<li>make a (join?) model for that table, that lets it know it belongs to the two models you are linking</li>
<li>tell each model that it is linked to it&#8217;s opposite model :through=&gt;  the joined model.</li>
<li>connected via a model</li>
<li>can spiderweb multiple models together</li>
</ul>
<p>Either will work for most things.  has_many :through seems to be more versatile (if a little more work required to get back what you want), especially if you want extra attributes.  habtm is quick, and simple, but not quite as diverse in it&#8217;s functionality.</p>
<p>Now looking closer at what I need to do, I will probably be required to connect at least three things together &#8211; and who knows, maybe more! Which would make has_many :through the way to go.</p>
<p>Good articles for more information or examples:</p>
<p>http://blog.hasmanythrough.com/2006/4/20/many-to-many-dance-off</p>
<p>http://stevengharms.com/rails-stevens-guide-to-many-to-many-associations-or-habtm-12</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thisorange.com/2009/07/24/has_many-through-or-has_and_belongs_to_many/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

