<?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>uRaNGaTaNG &#187; extension</title>
	<atom:link href="http://www.rngtng.com/tag/extension/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rngtng.com</link>
	<description>Featuring Ruby, Rails, Web development, Arduino, Processing, Nabaztag and more...</description>
	<lastBuildDate>Thu, 12 Jan 2012 10:08:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel='hub' href='http://www.rngtng.com/?pushpress=hub'/>
		<item>
		<title>What? &#8211; irb extension gem to find your methods</title>
		<link>http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/</link>
		<comments>http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 11:35:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[what?]]></category>
		<category><![CDATA[what_method]]></category>

		<guid isPermaLink="false">http://urangatang.wordpress.com/?p=10</guid>
		<description><![CDATA[
If Samuel just would have asked me, I got an answer:

Oldies, but Goldies: 'Methodfinder'  is a really nice extension for your ruby/rails irb and shipped with the 'what_methods' gem. I'm using quite a lot and can't go without it anymore (aka. I'm too stupid to remember all those method names ;-).

gem install what_methods

http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html

See ...]]></description>
			<content:encoded><![CDATA[<p><p><a href="http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/"><em>Click here to view the embedded video.</em></a></p><br />
If Samuel just would have asked me, I got an answer:</p>
<p>Oldies, but Goldies: &#8216;Methodfinder&#8217;  is a really nice extension for your ruby/rails irb and shipped with the &#8216;what_methods&#8217; gem. I&#8217;m using quite a lot and can&#8217;t go without it anymore (aka. I&#8217;m too stupid to remember all those method names <img src='http://www.rngtng.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p><code>gem install what_methods</code></p>
<p><a href="http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html" target="_blank">http://redhanded.hobix.com/inspect/stickItInYourIrbrcMethodfinder.html</a></p>
<p>See more hints by Dr. Nic blog <a href="http://drnicwilliams.com/2006/10/12/my-irbrc-for-consoleirb/">here</a></p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2010/09/24/what-irb-extension-gem-to-find-your-methods/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails flag_shih_tzu Plugin with named_scope</title>
		<link>http://www.rngtng.com/2009/08/20/rails-flag_shih_tzu-plugin-with-named_scope/</link>
		<comments>http://www.rngtng.com/2009/08/20/rails-flag_shih_tzu-plugin-with-named_scope/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 17:02:36 +0000</pubDate>
		<dc:creator>tobi</dc:creator>
				<category><![CDATA[Ruby, Rails & Co.]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.rngtng.com/?p=200</guid>
		<description><![CDATA[When it comes to store a load of boolean data into your model you easily end up with lots of columns which blow up your table unnecessarily. The developers at Xing solved this problem with a nifty Rails Plugin called flag_shih_tzu. The trick is to store all boolean values combined as a bit vector, ...]]></description>
			<content:encoded><![CDATA[<p>When it comes to store a load of boolean data into your model you easily end up with lots of columns which blow up your table unnecessarily. The developers at <a href="http://blog.xing.com/category/tech-blog">Xing</a> solved this problem with a nifty Rails Plugin called <a href="http://github.com/xing/flag_shih_tzu/">flag_shih_tzu</a>. The trick is to store all boolean values combined as a bit vector, which allows you to put up to 32 values (4Byte) within a single Integer column. Automatic generated access methods allows you to deal with you model as your are used to. Wanna see an example? (Taken from plugin docs)</p>
<pre class="brush: ruby; title: ; notranslate">
class Spaceship &lt; ActiveRecord::Base
  include FlagShihTzu

  has_flags 1 =&gt; :warpdrive,
            2 =&gt; :shields

end

enterprise = Spaceship.new
enterprise.warpdrive = true
enterprise.shields = false
enterprise.save

enterprise.warpdrive? #=&gt; true
enterprise.shields? # =&gt; false
</pre>
<p>Nice, isn&#8217;t it?</p>
<p>Unfortunately named scopes where missing for selecting models easily. So another github fork, another fix, and here were are. Now this works as well:</p>
<pre class="brush: ruby; title: ; notranslate">
Spaceship.flagged(:warpdrive).not_flagged(:shields).all
</pre>
<p>Check it out here: <a href="http://github.com/rngtng/flag_shih_tzu/tree/master" target="_blank">http://github.com/rngtng/flag_shih_tzu/tree/master</a></p>
<p><strong>Update:</strong> replaced &#8216;routes&#8217; with &#8216;scopes&#8217; &#8211; I&#8217;m getting confused with that all the time, how come!? <img src='http://www.rngtng.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://www.rngtng.com/2009/08/20/rails-flag_shih_tzu-plugin-with-named_scope/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

