<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bugs Need Fix</title>
	<atom:link href="http://bugsneedfix.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bugsneedfix.wordpress.com</link>
	<description>programming.design.excerpts of my work.troubleshoot.symptoms.etc</description>
	<lastBuildDate>Fri, 23 Oct 2009 07:42:28 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='bugsneedfix.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/ef86102eeb5edce98c924487b5d9521a?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Bugs Need Fix</title>
		<link>http://bugsneedfix.wordpress.com</link>
	</image>
			<item>
		<title>Ruby Version Manager</title>
		<link>http://bugsneedfix.wordpress.com/2009/10/23/ruby-version-manager/</link>
		<comments>http://bugsneedfix.wordpress.com/2009/10/23/ruby-version-manager/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 07:42:28 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[ruby version manager]]></category>
		<category><![CDATA[ruby1.9.1]]></category>
		<category><![CDATA[rvm]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=107</guid>
		<description><![CDATA[I&#8217;ve been meaning to start using ruby1.9 but always stuck at maintaining codes in production that depends on Ruby1.8.6. Fortunately, there&#8217;s this thing called Ruby Version Manager where you easily change between different rails version. I have nothing but praise for the guys who made life easier for us programmers to do our job better [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=107&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been meaning to start using ruby1.9 but always stuck at maintaining codes in production that depends on Ruby1.8.6. Fortunately, there&#8217;s this thing called Ruby Version Manager where you easily change between different rails version. I have nothing but praise for the guys who made life easier for us programmers to do our job better &amp; faster with RVM.</p>
<p>The only thing is you have to install your gems for each ruby version. It does make sense because there are quite a few gems that depends on different built. Installing gems are not that hard imho. So no issue there.</p>
<p>Now I can change between different ruby version as easy as this:</p>
<p>$ rvm 1.9.1 # For ruby 1.9.1</p>
<p>$ rvm 1.8.7</p>
<p>What&#8217;s excellent about this is the ruby version is sandbox in just that one terminal you&#8217;re using. It doesn&#8217;t interferes with your already *original ruby installation. * rvm calls is your ruby system. To revert back to your original ruby installation just do</p>
<p>$ rvm system</p>
<p>Or if you want to set a default ruby throughout your system. You can simply do so like this:</p>
<p>$ rvm 1.9.1 &#8211;default</p>
<p>If you haven&#8217;t tried it before, go try it. Don&#8217;t worry, it won&#8217;t mess up anything on your current ruby system</p>
<p><a href="http://rvm.beginrescueend.com/" target="_blank">Ruby Version Manager &#8211; http://rvm.beginrescueend.com/</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=107&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2009/10/23/ruby-version-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>Authlogic is Awesome</title>
		<link>http://bugsneedfix.wordpress.com/2009/10/22/authlogic-is-awesome/</link>
		<comments>http://bugsneedfix.wordpress.com/2009/10/22/authlogic-is-awesome/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 13:28:08 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[authlogic]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rails rails template]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=109</guid>
		<description><![CDATA[Have been tinkering around with authlogic. The most I love about is its out-of-the-box functionality. I used to wrestle with restful_authentication to get certain things that I need. Not in anyway that I&#8217;m bashing it  but seeing how easy authlogic I couldn&#8217;t believe why I didn&#8217;t use it sooner.
I like it so much that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=109&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Have been tinkering around with authlogic. The most I love about is its out-of-the-box functionality. I used to wrestle with restful_authentication to get certain things that I need. Not in anyway that I&#8217;m bashing it  but seeing how easy authlogic I couldn&#8217;t believe why I didn&#8217;t use it sooner.</p>
<p>I like it so much that I even made a rails template base on authlogic. This rails template has the usual basic signup/login/logout and I threw in some cucumber steps &amp; stories in it. Here it is in flesh &amp; bytes <a href="http://github.com/fadhlirahim/myrails-template/blob/master/template_authlogic.rb" target="_blank">http://github.com/fadhlirahim/myrails-template/blob/master/template_authlogic.rb</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=109&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2009/10/22/authlogic-is-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>Div&#8217;s does not wrap tr&#8217;s</title>
		<link>http://bugsneedfix.wordpress.com/2009/09/16/divs-does-not-wrap-trs/</link>
		<comments>http://bugsneedfix.wordpress.com/2009/09/16/divs-does-not-wrap-trs/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 14:50:12 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[tr]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=102</guid>
		<description><![CDATA[I tried to update a HTML div elevement wrapping around a table row inside a table.

&#60;table&#62;
&#60;tr&#62;
&#60;td&#62;Pomme&#60;/td&#62;
&#60;/tr&#62;
&#60;div id=&#34;placeholder&#34;&#62;
&#60;tr&#62;
&#60;td&#62;SomethingElse&#60;/td&#62;
&#60;/tr&#62;
&#60;/div&#62;

I wasted 1 hour to find out why my ajax calls aren&#8217;t updating the right table row.
Apparently it&#8217;s not valid HTML. The div will always be on top and then the table tag.
A workaround that I found to put [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=102&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I tried to update a HTML div elevement wrapping around a table row inside a table.</p>
<pre class="brush: xml;">
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;Pomme&lt;/td&gt;
&lt;/tr&gt;
&lt;div id=&quot;placeholder&quot;&gt;
&lt;tr&gt;
&lt;td&gt;SomethingElse&lt;/td&gt;
&lt;/tr&gt;
&lt;/div&gt;
</pre>
<p>I wasted 1 hour to find out why my ajax calls aren&#8217;t updating the right table row.</p>
<p>Apparently it&#8217;s not valid HTML. The div will always be on top and then the table tag.</p>
<p>A workaround that I found to put a placeholder id inside a table is by using &lt;tbody&gt;. So simply substitute the div with a tbody tag and you&#8217;re done.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=102&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2009/09/16/divs-does-not-wrap-trs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>My little contribution to a rails plugin (sort of)</title>
		<link>http://bugsneedfix.wordpress.com/2009/06/14/my-little-contribution-to-a-rails-plugin-sort-of/</link>
		<comments>http://bugsneedfix.wordpress.com/2009/06/14/my-little-contribution-to-a-rails-plugin-sort-of/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 16:03:42 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[weekly_builder]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=100</guid>
		<description><![CDATA[Getting your bug fix/code pulled into the main repo really gets you excited &#38; satisfied.
I never thought it could give me this much sense of enjoyment. Check it out.
http://github.com/dmix/weekly_builder/tree/master
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=100&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Getting your bug fix/code pulled into the main repo really gets you excited &amp; satisfied.</p>
<p>I never thought it could give me this much sense of enjoyment. Check it out.</p>
<p><a href="http://github.com/dmix/weekly_builder/tree/master" target="_blank">http://github.com/dmix/weekly_builder/tree/master</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=100&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2009/06/14/my-little-contribution-to-a-rails-plugin-sort-of/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>Includes &amp; Eager Loading</title>
		<link>http://bugsneedfix.wordpress.com/2009/06/08/includes-eager-loading/</link>
		<comments>http://bugsneedfix.wordpress.com/2009/06/08/includes-eager-loading/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 14:27:04 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[eager loading]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=91</guid>
		<description><![CDATA[I&#8217;m figuring out something in my rails app.  I&#8217;m figuring out which one&#8217;s the worst:
Eager loading 100 rows of data you don&#8217;t actually need at the moment
or
10 queries giving 10 result set at once?
Here&#8217;s the code to explain it.
 


@event = Event.find(params[:event_id])

@event_attendees = @event.attendees.paginate(:page =&#62; params[:page], :per_page =&#62; 10)

In the view, for each attendees, it&#8217;s [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=91&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m figuring out something in my rails app.  I&#8217;m figuring out which one&#8217;s the worst:</p>
<p>Eager loading 100 rows of data you don&#8217;t actually need at the moment</p>
<p>or</p>
<p>10 queries giving 10 result set at once?</p>
<p>Here&#8217;s the code to explain it.</p>
<p><code><strong> </strong></code></p>
<pre class="brush: ruby;">

@event = Event.find(params[:event_id])

@event_attendees = @event.attendees.paginate(:page =&gt; params[:page], :per_page =&gt; 10)
</pre>
<p>In the view, for each attendees, it&#8217;s calling a purchase record. Since I&#8217;m using will_paginate and setting 10 records per page, for every 10 record of attendees, there&#8217;s 10 queries for a purchase record. Here&#8217;s the following SQL that will be generated:</p>
<pre class="brush: sql;">
SELECT * FROM `attendees` WHERE (`attendees`.event_id = 4)

SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 1) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 2) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 3) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 4) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 5) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 6) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 7) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 9) LIMIT 1
SELECT * FROM `purchases` WHERE (purchasable_type = 'Attendee' and purchasable_id = 10) LIMIT 1
</pre>
<p>Clearly you can that see the above code creates a n + 1 problem.</p>
<p>So I tried to modified it using eager loading like the following:</p>
<pre class="brush: ruby;">
@event_attendees = @event.attendees.paginate(:include =&gt; :purchase, :page =&gt; params[:page], :per_page =&gt; 10)
</pre>
<p>Here&#8217;s the following SQL query generated:</p>
<pre class="brush: sql;">
SELECT * FROM `attendees` WHERE (`attendees`.event_id = 4)
SELECT `purchases`.* FROM `purchases` WHERE (`purchases`.`purchasable_id` IN (1,2,3,4..100) and `purchases`.`purchasable_type` = 'Attendee')
 # query is shorten for brevity
</pre>
<p>You can see that it&#8217;s using 1 query that fetches 100 rows of data. At first I thought that it will limit the eager loading with my will_paginate per page settings. But clearly for every page that I&#8217;m viewing, it&#8217;s calling that query hence returning 100 rows of data for each page I&#8217;m viewing.</p>
<p>At the moment I&#8217;m using the query without eager loading. Simply because I&#8217;m concern the app is fetching 100 rows that I don&#8217;t need at once. I have no idea how to limit an eager loading association base on will _paginate per_page. Or probably I could eager load once and keep in cache. Or does rails does that automatically?</p>
<p>Will investigate though. Oh well, back to work!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=91&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2009/06/08/includes-eager-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>Routes Gotcha</title>
		<link>http://bugsneedfix.wordpress.com/2008/12/18/routes-gotcha/</link>
		<comments>http://bugsneedfix.wordpress.com/2008/12/18/routes-gotcha/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 01:52:05 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[rails routes]]></category>
		<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=89</guid>
		<description><![CDATA[Something peculiar happened when I was doing something trivial.
If you accidently named your restful route the following
resource :roles instead of resources :roles
When you point your app to /roles it won&#8217;t go to your index controller action but it will instead call your show action.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=89&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Something peculiar happened when I was doing something trivial.</p>
<p>If you accidently named your restful route the following</p>
<p>resource :roles instead of resource<strong>s</strong> :roles</p>
<p>When you point your app to /roles it won&#8217;t go to your index controller action but it will instead call your show action.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=89&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2008/12/18/routes-gotcha/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>git svn can&#8217;t locate SVN/Core.pm</title>
		<link>http://bugsneedfix.wordpress.com/2008/12/07/git-svn-cant-locate-svncorepm/</link>
		<comments>http://bugsneedfix.wordpress.com/2008/12/07/git-svn-cant-locate-svncorepm/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 05:03:51 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[git]]></category>
		<category><![CDATA[git-svn]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=85</guid>
		<description><![CDATA[I had a problem when running git svn command on my ubuntu.
Can&#8217;t locate SVN/Core.pm in @INC
It turns out all I had to do is install libsvn-perl.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=85&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had a problem when running git svn command on my ubuntu.</p>
<p>Can&#8217;t locate SVN/Core.pm in @INC</p>
<p>It turns out all I had to do is install libsvn-perl.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=85&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2008/12/07/git-svn-cant-locate-svncorepm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>Rebuilding Ferret Index</title>
		<link>http://bugsneedfix.wordpress.com/2008/11/20/rebuilding-ferret-index/</link>
		<comments>http://bugsneedfix.wordpress.com/2008/11/20/rebuilding-ferret-index/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 05:13:51 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[acts_as_ferret]]></category>
		<category><![CDATA[ferret]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=82</guid>
		<description><![CDATA[I had trouble reindexing the ferret index using the rake command (rake ferret:rebuild). I got this non-descriptive error regarding failing to rebuild it (Even in my development mode). So after googling for it, all one has to do is so simple.
Go into your rails script/console and just type
Model.rebuild_index
And you&#8217;re done.
      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=82&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had trouble reindexing the ferret index using the rake command (rake ferret:rebuild). I got this non-descriptive error regarding failing to rebuild it (Even in my development mode). So after googling for it, all one has to do is so simple.</p>
<p>Go into your rails script/console and just type</p>
<p>Model.rebuild_index</p>
<p>And you&#8217;re done.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=82&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2008/11/20/rebuilding-ferret-index/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>Twitter Fuhrer</title>
		<link>http://bugsneedfix.wordpress.com/2008/08/17/twitter-fuhrer/</link>
		<comments>http://bugsneedfix.wordpress.com/2008/08/17/twitter-fuhrer/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 08:28:18 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Others]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=75</guid>
		<description><![CDATA[This is how people are upset about Twitter.

http://iamrice.org/post/46208882/bullshit-hitler-twitters
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=75&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is how people are upset about Twitter.<br />
<a href="http://http://iamrice.org/post/46208882/bullshit-hitler-twitters"><br />
http://iamrice.org/post/46208882/bullshit-hitler-twitters</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bugsneedfix.wordpress.com/75/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bugsneedfix.wordpress.com/75/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=75&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2008/08/17/twitter-fuhrer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
		<item>
		<title>Ensuring your join model uniqueness</title>
		<link>http://bugsneedfix.wordpress.com/2008/07/22/ensuring-your-join-model-uniqueness/</link>
		<comments>http://bugsneedfix.wordpress.com/2008/07/22/ensuring-your-join-model-uniqueness/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 09:28:12 +0000</pubDate>
		<dc:creator>Fadhli</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[:scope]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[validates_uniqueness_of]]></category>

		<guid isPermaLink="false">http://bugsneedfix.wordpress.com/?p=70</guid>
		<description><![CDATA[For example:
id &#124;category_id &#124; inventory_id
1   384            1            #first entry
2   384            2        [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=70&subd=bugsneedfix&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For example:</p>
<p>id |category_id | inventory_id</p>
<pre>1   384            1            #first entry
2   384            2            #this would be ok.
3   384            1            #this would not be ok</pre>
<p>To ensure that a category_id doesn&#8217;t have any inventory_id duplicate:</p>
<pre class="brush: ruby;">

class CategoryProduct &lt; ActiveRecord::Base
  belongs_to :category
  belongs_to :inventory

  validates_uniqueness_of :category_id, :scope =&gt; :inventory_id
end
</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/bugsneedfix.wordpress.com/70/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/bugsneedfix.wordpress.com/70/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bugsneedfix.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bugsneedfix.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bugsneedfix.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bugsneedfix.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bugsneedfix.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bugsneedfix.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bugsneedfix.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bugsneedfix.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bugsneedfix.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bugsneedfix.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bugsneedfix.wordpress.com&blog=3672990&post=70&subd=bugsneedfix&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://bugsneedfix.wordpress.com/2008/07/22/ensuring-your-join-model-uniqueness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6404b6d28932766fd6e65955d958c7f7?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Fadhli</media:title>
		</media:content>
	</item>
	</channel>
</rss>