<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>mammals blog</title>
	<atom:link href="http://bluewhalelabs.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluewhalelabs.wordpress.com</link>
	<description>serious blogging by the best mammals in town</description>
	<lastBuildDate>Thu, 19 Feb 2009 11:15:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bluewhalelabs.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>mammals blog</title>
		<link>http://bluewhalelabs.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bluewhalelabs.wordpress.com/osd.xml" title="mammals blog" />
	<atom:link rel='hub' href='http://bluewhalelabs.wordpress.com/?pushpress=hub'/>
		<item>
		<title>&#8220;Dynamic finders with hash attributes for creation&#8221;</title>
		<link>http://bluewhalelabs.wordpress.com/2009/02/19/dynamic-finders-with-hash-attributes-for-creation/</link>
		<comments>http://bluewhalelabs.wordpress.com/2009/02/19/dynamic-finders-with-hash-attributes-for-creation/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 11:14:47 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/2009/02/19/dynamic-finders-with-hash-attributes-for-creation/</guid>
		<description><![CDATA[Here&#8217;s a typical situation: tag = Tag.find_by_name(name)if tag.nil? tag = Tag.create(:name =&#62; name, :creator =&#62; current_user)end You&#8217;d think the way to do that would be with the find_or_create_by_name dynamic finder, but that doesn&#8217;t work since there&#8217;s no way to search by name only, but create by name and creator. Well, that&#8217;s just not right. So [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=32&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a typical situation:<br /><span style="color:rgb(0,0,153);"><span style="font-weight:bold;"><br /></span></span><br />
<blockquote><span style="color:rgb(0,0,153);">tag = Tag.find_by_name(name)</span><br /><span style="color:rgb(0,0,153);">if tag.nil?</span><br /><span style="color:rgb(0,0,153);">  tag = Tag.create(:name =&gt; name, :creator =&gt; current_user)</span><br /><span style="color:rgb(0,0,153);">end</span></p></blockquote>
<p>You&#8217;d think the way to do that would be with the find_or_create_by_name dynamic finder, but that doesn&#8217;t work since there&#8217;s no way to search by name only, but create by name and creator. Well, that&#8217;s just not right. So here&#8217;s what we&#8217;ll do:<br /><span style="color:rgb(0,0,153);"><br /></span><br />
<blockquote><span style="color:rgb(0,0,153);">Tag.find_or_create_by_name(:name =&gt; name, :creator =&gt; current_user)</span><br /><span style="color:rgb(0,0,153);"></span></p></blockquote>
<p>It&#8217;s not a big deal or something I use every day, but I like it anyway.</p>
<p>Source : google .</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=0336f9cf-1f49-4da7-9bfb-a96539dbb5cd" /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=32&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2009/02/19/dynamic-finders-with-hash-attributes-for-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=0336f9cf-1f49-4da7-9bfb-a96539dbb5cd" medium="image" />
	</item>
		<item>
		<title>Difference between http://sitename.com and http://www.sitename.com</title>
		<link>http://bluewhalelabs.wordpress.com/2009/01/08/difference-between-httpsitenamecom-and-httpwwwsitenamecom/</link>
		<comments>http://bluewhalelabs.wordpress.com/2009/01/08/difference-between-httpsitenamecom-and-httpwwwsitenamecom/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 14:29:07 +0000</pubDate>
		<dc:creator>sachinchoudhary</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[Difference between http://sitename.com and http://www.sitename.com]]></category>
		<category><![CDATA[rewriterule]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/2009/01/08/difference-between-httpsitenamecom-and-httpwwwsitenamecom/</guid>
		<description><![CDATA[Most of the time when your domain is example after you commit your application you can access your site by typing http://example.com or by http://www.example.com. suppose if login on http://example.com and after you login if you add www in the address bar then your cookies and session are all lost. to avoid this you have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=31&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most of the time when your domain is example after you commit your application you can access your site by typing http://example.com or by http://www.example.com.</p>
<p>suppose if login on http://example.com and after you login if you add www in the address bar then your cookies and session are all lost. to avoid this you have to write a redirect rule in the apache.</p>
<p>In the rewriting rule you just have to choose only one format of the url</p>
<p>RewriteCond %{HTTP_HOST} ^yoursite\.com [NC]<br />
RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=31&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2009/01/08/difference-between-httpsitenamecom-and-httpwwwsitenamecom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7683fd4f5c981135b240701fe3f2a5b?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">sachinchoudhary</media:title>
		</media:content>
	</item>
		<item>
		<title>Mammals In Black</title>
		<link>http://bluewhalelabs.wordpress.com/2008/12/13/mammals-in-black/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/12/13/mammals-in-black/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 15:01:27 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[pics]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/2008/12/13/mammals-in-black/</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=26&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 614px"><a href="http://www.facebook.com/photo.php?pid=1656396&amp;l=e857f&amp;id=551752244"><img title="Even we promote people to wear blue clothings, jeans, shirts , notice the CAP even its blue ." src="http://photos-f.ak.fbcdn.net/photos-ak-snc1/v1479/245/77/551752244/n551752244_1656397_2402.jpg" alt="Even we promote people to wear blue clothings, jeans, shirts , notice the CAP even its blue ." width="604" height="453" /></a><p class="wp-caption-text">Even we promote people to wear blue clothings, jeans, shirts , notice the CAP even its blue .</p></div>
<div class="wp-caption aligncenter" style="width: 614px"><a href="http://www.facebook.com/photo.php?pid=1656396&amp;l=e857f&amp;id=551752244"><img title="Dont forget to notice the Black T-shirt and the Blue whale logo ." src="http://photos-e.ak.fbcdn.net/photos-ak-snc1/v1479/245/77/551752244/n551752244_1656396_1404.jpg" alt="Dont forget to notice the Black T-shirt and the Blue whale logo ." width="604" height="453" /></a><p class="wp-caption-text">Don&#39;t forget to notice the Black T-shirt and the Blue whale logo .</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=26&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/12/13/mammals-in-black/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>

		<media:content url="http://photos-f.ak.fbcdn.net/photos-ak-snc1/v1479/245/77/551752244/n551752244_1656397_2402.jpg" medium="image">
			<media:title type="html">Even we promote people to wear blue clothings, jeans, shirts , notice the CAP even its blue .</media:title>
		</media:content>

		<media:content url="http://photos-e.ak.fbcdn.net/photos-ak-snc1/v1479/245/77/551752244/n551752244_1656396_1404.jpg" medium="image">
			<media:title type="html">Dont forget to notice the Black T-shirt and the Blue whale logo .</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Sum/Avg method in Rails , save a query&#8221;</title>
		<link>http://bluewhalelabs.wordpress.com/2008/12/09/sumavg-method-in-rails-save-a-query/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/12/09/sumavg-method-in-rails-save-a-query/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 10:41:51 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/2008/12/09/sumavg-method-in-rails-save-a-query/</guid>
		<description><![CDATA[Ever wondered about the Calculations in Rails, I used to use the group_by in SQL or select to do many calculations while fetching the results , but sometimes Rails doesnt allow to use group etc , like when we are doing AJAX calls in v2.1.0 of rails . Then Joejeet helped me to get the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=21&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever wondered about the Calculations in Rails, I used to use the group_by in SQL or select to do many calculations while fetching the results , but sometimes Rails doesnt allow to use group etc , like when we are doing AJAX calls in v2.1.0 of rails .</p>
<p>Then Joejeet helped me to get the following  calculations methods , it was so beautiful that my 3 line of code was convered to 1 single line.</p>
<p>Code<br />
<span style="font-family:'Comic Sans MS';"><big>@rating_sum = Rating.sum(&#8216;rating&#8217;, :conditions =&gt;["rateable_id = ? and rateable_type = ?", @rating.rateable_id, @rating.rateable_type])</big></span></p>
<p>There are other methods like Avg,minimum, max,count etc available under<br />
<span style="font-family:'Comic Sans MS';"><big>Module: ActiveRecord::Calculations::ClassMethods</big></span></p>
<p class="technorati-tags"><a href="http://technorati.com/tag/calculations" rel="tag">calculations</a>, <a href="http://technorati.com/tag/calculations%20in%20rails" rel="tag">calculations in rails</a>, <a href="http://technorati.com/tag/sum" rel="tag">sum</a>, <a href="http://technorati.com/tag/avg" rel="tag">avg</a>, <a href="http://technorati.com/tag/minimum" rel="tag">minimum</a>, <a href="http://technorati.com/tag/rails" rel="tag">rails</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=21&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/12/09/sumavg-method-in-rails-save-a-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Changing the class of a div using rails NOT JS&#8221;</title>
		<link>http://bluewhalelabs.wordpress.com/2008/12/09/changing-the-class-of-a-div-using-rails-not-js/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/12/09/changing-the-class-of-a-div-using-rails-not-js/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 10:33:20 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/2008/12/09/changing-the-class-of-a-div-using-rails-not-js/</guid>
		<description><![CDATA[Consider we need to change the class of a particular DIV/SPAN , I was wondering how we could have done using some default rails method and NOT Javascript as what we can do in Javascript the same we can do using Rails but in lesser time and number of lines of code.Using google with the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=18&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Consider we need to change the class of a particular DIV/SPAN , I was wondering how we could have done using some default rails method and NOT Javascript as what we can do in Javascript the same we can do using Rails but in lesser time and number of lines of code.<br />Using google with the correct key words resulted in the following </p>
<p><span style="text-decoration:underline;">Javascript </span></p>
<p><big><span style="font-family:Courier New;">function&nbsp;change(id, newclass) <br />{ <br />identity=document.getElementById(id); <br />identity.className=newclass; <br />}</span></big></p>
<p><span style="text-decoration:underline;">Rails</span></p>
<p><span style="font-family:Courier New;"><big>page["task_#{params[:id]}&#8221;].toggle_class_name &#8220;completed&#8221;</big><br /></span></p>
<p class="technorati-tags"><a href="http://technorati.com/tag/rails" rel="tag">rails</a>, <a href="http://technorati.com/tag/javascript" rel="tag">javascript</a>, <a href="http://technorati.com/tag/page.toggle_class_name" rel="tag">page.toggle_class_name</a>, <a href="http://technorati.com/tag/change%20class%20name%20of%20div%20%20in%20rails" rel="tag">change class name of div  in rails</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=18&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/12/09/changing-the-class-of-a-div-using-rails-not-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;SQL inner joins the right way &#8220;</title>
		<link>http://bluewhalelabs.wordpress.com/2008/11/26/sql-inner-joins-the-right-way/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/11/26/sql-inner-joins-the-right-way/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 15:05:16 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/2008/11/26/sql-inner-joins-the-right-way/</guid>
		<description><![CDATA[The right way&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-select s.CompanyNamefrom Suppliers as swhere exists(select * from products pinner join categories c on p.CategoryID = c.CategoryIDwhere c.CategoryName = &#8220;Seafood&#8221;and p.SupplierID=s.SupplierID)&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- The wrong way&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;SELECT DISTINCT Suppliers.CompanyNameFROM Suppliers INNER JOIN (Categories INNER JOIN Products ONCategories.CategoryID = Products.CategoryID) ON Suppliers.SupplierID =Products.SupplierIDWHERE (((Categories.CategoryName)=&#8221;Seafood&#8221;))&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; sql<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=16&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="border-collapse:separate;color:rgb(0,0,0);font-family:Verdana;font-size:16px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;orphans:2;text-indent:0;text-transform:none;white-space:normal;widows:2;word-spacing:0;"><br />The right way<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />select s.CompanyName<br />from Suppliers as s<br />where exists<br />(<br />select * from products p<br />inner join categories c on p.CategoryID = c.CategoryID<br />where c.CategoryName = &#8220;Seafood&#8221;<br />and p.SupplierID=s.SupplierID<br />)<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>The wrong way<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />SELECT DISTINCT Suppliers.CompanyName<br />FROM Suppliers INNER JOIN (Categories INNER JOIN Products ON<br />Categories.CategoryID = Products.CategoryID) ON Suppliers.SupplierID =<br />Products.SupplierID<br />WHERE (((Categories.CategoryName)=&#8221;Seafood&#8221;))<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="technorati-tags"><a href="http://technorati.com/tag/sql" rel="tag">sql</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=16&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/11/26/sql-inner-joins-the-right-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript function to set a web page as home page for IE and Firefox Compatible</title>
		<link>http://bluewhalelabs.wordpress.com/2008/11/21/javascript-function-to-set-a-web-page-as-home-page-for-ie-and-firefox-compatible/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/11/21/javascript-function-to-set-a-web-page-as-home-page-for-ie-and-firefox-compatible/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 04:24:21 +0000</pubDate>
		<dc:creator>sachinchoudhary</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[Homepage]]></category>
		<category><![CDATA[IE firefox compatible]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/?p=10</guid>
		<description><![CDATA[To make a page as home page by clicking a link you just have to right this javascript function in you .js file function setHome()   {     if (document.all)     {      document.body.style.behavior=’url(#default#homepage)’;      document.body.setHomePage(’http://url_of_page.com’);     }     else if (window.sidebar)      {          if(window.netscape)          [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=10&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="snap_preview">
<p>To make a page as home page by clicking a link you just have to right this javascript function in you .js file</p>
<p><strong>function setHome()<br />
  {<br />
    if (document.all)<br />
    {<br />
     document.body.style.behavior=’url(#default#homepage)’;<br />
     document.body.setHomePage(’http://url_of_page.com’);</strong></p>
<p><strong>    }<br />
    else if (window.sidebar)<br />
     {<br />
         if(window.netscape)<br />
         {<br />
          try<br />
          {<br />
          netscape.security.PrivilegeManager.enablePrivilege(”UniversalXPConnect”);<br />
          }<br />
       catch(e)<br />
      {<br />
    alert(”this action was aviod by your browser，if you want to enable，please enter        about:config in your address line,and change the value of     signed.applets.codebase_principal_support to true”);<br />
}<br />
}</strong><br />
<strong> var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);<br />
prefs.setCharPref(’browser.startup.homepage’,&#8217;http://url_of_page.com’);<br />
}<br />
}</strong></p>
<p>After adding this you only have to call this javascript method.</p>
<p><strong>&lt;a href=”javascript:setHome();”&gt;make your home page &lt;/a&gt;</strong></p>
<p>and that’s all</p>
<p>This is compatible for IE and firefox</p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=10&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/11/21/javascript-function-to-set-a-web-page-as-home-page-for-ie-and-firefox-compatible/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7683fd4f5c981135b240701fe3f2a5b?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">sachinchoudhary</media:title>
		</media:content>
	</item>
		<item>
		<title>rails helper method to redirect to back page visited</title>
		<link>http://bluewhalelabs.wordpress.com/2008/11/21/rails-helper-method-to-redirect-to-back-page-visited/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/11/21/rails-helper-method-to-redirect-to-back-page-visited/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 04:22:46 +0000</pubDate>
		<dc:creator>sachinchoudhary</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[redirect back]]></category>
		<category><![CDATA[request.env["HTTP_REFERER"]]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/?p=8</guid>
		<description><![CDATA[Sometime we get stuckin a problem when we have go back last page which user visited but rails doesn’t comes with a helper method which gets beck to the last page visitted, But everytime a request goeas to the server a request object is created by the rails which contains the url of the page [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=8&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="snap_preview">
<p>Sometime we get stuckin a problem when we have go back last page which user visited but rails doesn’t comes with a helper method which gets beck to the last page visitted, But everytime a request goeas to the server a request object is created by the rails which contains the url of the page from which user comes to current page so we can use that as follows :-</p>
<p>helper method which you have to put in your application controller</p>
<p><strong>class ApplicationController &lt; ActionController::Base</strong></p>
<p><strong>:helper_method :redirect_back</strong></p>
<p><strong>def redirect_back(redirect_opts = nil)<br />
    redirect_opts ||= home_url<br />
    request.env["HTTP_REFERER"] ? (request.env["HTTP_REFERER"]) : (redirect_opts)<br />
end</strong></p>
<p><strong>end</strong></p>
<p>sometimes if the firewall is actvated on the client side then this request.env["HTTP_REFERER"]doesn’t gets set, so we have to check this condition also. if the request.env["HTTP_REFERER"] is not created then we have to redirect it to different url in my case i use the home_url but you can change as per your requirement.</p>
<p>you can use this method from your views.</p>
<p>If you want to call this as method from controller you have 2 options</p>
<ol>
<li>either use this method as bellow</li>
</ol>
<p><strong>def redirect_back(redirect_opts = nil)<br />
    redirect_opts ||= home_url<br />
    redirect_to request.env["HTTP_REFERER"] ? (request.env["HTTP_REFERER"]) : (redirect_opts)<br />
end</strong></p>
<p>2.  write redirect_to and call this method from controller as bellow</p>
<p><strong>def create</strong></p>
<p><strong>    —— some codes ——-</strong></p>
<p><strong>    redirect_to redirect_back(clubs_path)</strong></p>
<p><strong>end</strong></p>
<p>if <strong>request.env["HTTP_REFERER"]</strong> not get set then the transfer goes to clubs and if you don’t pass any parameter then by default it will get you to the home page</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=8&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/11/21/rails-helper-method-to-redirect-to-back-page-visited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7683fd4f5c981135b240701fe3f2a5b?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">sachinchoudhary</media:title>
		</media:content>
	</item>
		<item>
		<title>Blue Whale Labs Developer Blog</title>
		<link>http://bluewhalelabs.wordpress.com/2008/11/21/blue-whale-labs-developer-blog/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/11/21/blue-whale-labs-developer-blog/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 04:21:06 +0000</pubDate>
		<dc:creator>adarshpandit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[admin]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/?p=3</guid>
		<description><![CDATA[This blog is intended to be used for code sharing, tips, tricks, and coding challenges. Also use this for asking for help from others. Please set this as your homepage and use tags liberally. This is what you make of it &#8211; there are no ground rules so have fun!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=3&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog is intended to be used for code sharing, tips, tricks, and coding challenges. Also use this for asking for help from others.</p>
<p>Please set this as your homepage and use tags liberally. This is what you make of it &#8211; there are no ground rules so have fun!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=3&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/11/21/blue-whale-labs-developer-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/692dad2af6224bf856e94a96049292c4?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">adarshp</media:title>
		</media:content>
	</item>
		<item>
		<title>“Debugging in rails”</title>
		<link>http://bluewhalelabs.wordpress.com/2008/11/20/%e2%80%9cdebugging-in-rails%e2%80%9d/</link>
		<comments>http://bluewhalelabs.wordpress.com/2008/11/20/%e2%80%9cdebugging-in-rails%e2%80%9d/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 13:15:11 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://bluewhalelabs.wordpress.com/?p=6</guid>
		<description><![CDATA[Well ever thought of debugging the rails application , there are many ways , one way which I liked of lately was the debugger in action directly. Step 1 : Install ruby-debugger gem “sudo gem install ruby-debugger –include_dependencies” Step 2 : Dont forget to start debugging server by saying ruby script/server –debugger Step 3 : [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=6&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well ever thought of debugging the rails application , there are many ways , one way which I liked of lately was the debugger in action directly.<br />
Step 1 :  Install ruby-debugger gem “sudo gem install ruby-debugger –include_dependencies”<br />
Step 2 :  Dont forget to start debugging server by saying<br />
ruby script/server  –debugger<br />
Step 3 :  Say debuggger in the action, the console will open in the command line for the code written below to debugger</p>
<p>eg:<br />
def foo<br />
debugger<br />
@object = Active.find(:all)<br />
end<br />
When in that case in the command line we will get a rbd : opened , where you can debug the object like @object.size etc<br />
Thats it enjoy , there are some other methods like  ,  , puts etc which I guess all of us already know abt.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bluewhalelabs.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bluewhalelabs.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bluewhalelabs.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bluewhalelabs.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bluewhalelabs.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bluewhalelabs.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bluewhalelabs.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bluewhalelabs.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bluewhalelabs.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bluewhalelabs.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bluewhalelabs.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bluewhalelabs.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bluewhalelabs.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bluewhalelabs.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bluewhalelabs.wordpress.com&amp;blog=5569655&amp;post=6&amp;subd=bluewhalelabs&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bluewhalelabs.wordpress.com/2008/11/20/%e2%80%9cdebugging-in-rails%e2%80%9d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=monsterid" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
	</channel>
</rss>
