<?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>"golb ecruos nepo".reverse</title>
	<atom:link href="http://ctrlshiftesc.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ctrlshiftesc.wordpress.com</link>
	<description>Related to Unrelated ..no the name of my dog is not Sharukh</description>
	<lastBuildDate>Thu, 19 Feb 2009 11:02:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ctrlshiftesc.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>"golb ecruos nepo".reverse</title>
		<link>http://ctrlshiftesc.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ctrlshiftesc.wordpress.com/osd.xml" title="&#34;golb ecruos nepo&#34;.reverse" />
	<atom:link rel='hub' href='http://ctrlshiftesc.wordpress.com/?pushpress=hub'/>
		<item>
		<title>&#8220;Dynamic finders with hash attributes for creation&#8221;</title>
		<link>http://ctrlshiftesc.wordpress.com/2009/02/19/dynamic-finders-with-hash-attributes-for-creation/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2009/02/19/dynamic-finders-with-hash-attributes-for-creation/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 11:02:04 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.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=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=257&amp;subd=ctrlshiftesc&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=fb333d2b-8590-4997-aecc-9b303703ddfe" /></div>
<br />Posted in ruby on rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/257/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=257&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.wordpress.com/2009/02/19/dynamic-finders-with-hash-attributes-for-creation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=fb333d2b-8590-4997-aecc-9b303703ddfe" medium="image" />
	</item>
		<item>
		<title>&#8220;Highlighting Text in Rails &#8220;</title>
		<link>http://ctrlshiftesc.wordpress.com/2009/01/29/highlighting-text-in-rails/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2009/01/29/highlighting-text-in-rails/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 13:26:00 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.wordpress.com/2009/01/29/highlighting-text-in-rails/</guid>
		<description><![CDATA[Presumably you’ve seen those Web 2.0 sites that highlight random words in the marketing text to draw your attention. A little-known view helper in Rails makes this sort of thing trivial. For example, you can combine this markup in your view: view plain copy to clipboard print 1. With this bit of CSS: view plaincopy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=256&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Presumably you’ve seen those Web 2.0 sites that highlight random words in the marketing text to draw your attention. A little-known view helper in Rails makes this sort of thing trivial. For example, you can combine this markup in your view:<br />
view plain copy to clipboard print</p>
<p>   1.   </p>
<p>With this bit of CSS:<br />
view plaincopy to clipboardprint</p>
<p>   1. .highlight  { background:#ff0; }  </p>
<p>.highlight  { background:#ff0; }</p>
<p>And you get this result:</p>
<p>highlight</p>
<p>Easy enough. But wait, there’s more! You can specify an entire array of words and phrases to highlight:<br />
view plaincopy to clipboardprint</p>
<p>   1.   </p>
<p>Even better, highlight supports a :highlight option, which lets you specify a custom string to use for highlighting. The token \1 will be replaced with the text to be highlighted. This lets you change the HTML markup:<br />
view plaincopy to clipboardprint</p>
<p>   1.  &#8216;<em>\1</em>&#8216;) %&gt;  </p>
<p> &#8216;<em>\1</em>&#8216;) %&gt;</p>
<p>This ability to insert arbitrary surrounding markup makes highlight more flexible, if you let yourself think out of the box:<br />
view plaincopy to clipboardprint</p>
<p>   1.  &#8216;<a href="/users/\1">\1</a>) %&gt;  </p>
<p> &#8216;<a href="/users/\1">\1</a>) %&gt;</p>
<p>It’s worth taking a dip into ActionView::Helpers occasionally to see what other bits of functionality are lurking that you’ve forgotten about.</p>
<p>Source : http://afreshcup.com/2009/01/29/highlighting-text-in-rails/</p>
<p class="technorati-tags"><a href="http://technorati.com/tag/rails" rel="tag">rails</a>, <a href="http://technorati.com/tag/highlight%20text%20in%20rails" rel="tag">highlight text in rails</a></p>
<br />Posted in ruby on rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/256/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/256/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/256/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=256&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.wordpress.com/2009/01/29/highlighting-text-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing ActiveMQ</title>
		<link>http://ctrlshiftesc.wordpress.com/2009/01/08/installing-activemq/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2009/01/08/installing-activemq/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 12:21:58 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.wordpress.com/2009/01/08/installing-activemq/</guid>
		<description><![CDATA[Step1 : Download the 4.X.X from the below link http://activemq.apache.org/getting-started.html#GettingStarted-Download Step 2: From a console window, change to the installation directory and run ActiveMQ: cd [activemq_install_dir] where activemq_install_dir is the directory in which ActiveMQ was installed, e.g., c:\Program Files\ActiveMQ-4.x. Then type: bin\activemq NOTE: Working directories get created relative to the current directory. To create working [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=254&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Step1 :</p>
<p>Download the 4.X.X from the below link</p>
<p>http://activemq.apache.org/getting-started.html#GettingStarted-Download</p>
<p>Step 2:</p>
<p>From a console window, change to the installation directory and run ActiveMQ:<br />
cd [activemq_install_dir]<br />
where activemq_install_dir is the directory in which ActiveMQ was installed, e.g., c:\Program Files\ActiveMQ-4.x.<br />
Then type:<br />
bin\activemq<br />
NOTE: Working directories get created relative to the current directory. To create working directories in the proper place, ActiveMQ must be launched from its home/installation directory.</p>
<p>If unix/linux</p>
<p>From a command shell, change to the installation directory and run ActiveMQ:<br />
cd [activemq_install_dir]<br />
where activemq_install_dir is the directory in which ActiveMQ was installed, e.g., /usr/local/activemq-4.x.<br />
Then type:<br />
bin/activemq</p>
<p>OR</p>
<p>bin/activemq &gt; /tmp/smlog  2&gt;&amp;1 &amp;;<br />
Note: /tmp/smlog may be changed to another file name.</p>
<p class="technorati-tags"><a href="http://technorati.com/tag/ActiveMQ" rel="tag">ActiveMQ</a>, <a href="http://technorati.com/tag/stomp" rel="tag">stomp</a></p>
<br />Posted in ruby on rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=254&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.wordpress.com/2009/01/08/installing-activemq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Sum/Avg method in Rails , save a query&#8221;</title>
		<link>http://ctrlshiftesc.wordpress.com/2008/12/09/sumavg-method-in-rails-save-a-query/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2008/12/09/sumavg-method-in-rails-save-a-query/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 10:43:00 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.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=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=252&amp;subd=ctrlshiftesc&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 />Posted in ruby on rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/252/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/252/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/252/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=252&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.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=" 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://ctrlshiftesc.wordpress.com/2008/12/09/changing-the-class-of-a-div-using-rails-not-js/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2008/12/09/changing-the-class-of-a-div-using-rails-not-js/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 10:31:51 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[mumbai]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.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=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=249&amp;subd=ctrlshiftesc&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 />Posted in javascript, mumbai, rails, videos Tagged: javascript, rails <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/249/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/249/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/249/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=249&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.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=" 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://ctrlshiftesc.wordpress.com/2008/11/26/sql-inner-joins-the-right-way/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2008/11/26/sql-inner-joins-the-right-way/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 15:04:44 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.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 Posted in SQL Tagged: SQL<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=245&amp;subd=ctrlshiftesc&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 />Posted in SQL Tagged: SQL <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/245/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=245&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.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=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;The ruby-debug Commands&#8221;</title>
		<link>http://ctrlshiftesc.wordpress.com/2008/11/12/the-ruby-debug-commands/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2008/11/12/the-ruby-debug-commands/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 10:23:01 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[debugging]]></category>
		<category><![CDATA[Debugging in rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.wordpress.com/2008/11/12/the-ruby-debug-commands/</guid>
		<description><![CDATA[The ruby-debug Commands What follows is a quick rundown of the most important ruby-debug commands, along with a brief description of what they do. Don&#8217;t worry too much about remembering every last detail &#8212; the built-in help command will list all the available commands for you. You can also use the&#160;help &#60;commandname&#62;&#160;syntax to get help [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=239&amp;subd=ctrlshiftesc&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(85,85,85);font-family:Verdana;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:14px;orphans:2;text-indent:0;text-transform:none;white-space:normal;widows:2;word-spacing:0;"><br />
<h5 style="font-size:100%;line-height:140%;margin:0;padding:10px 0;">The ruby-debug Commands</h5>
<p style="line-height:140%;margin:10px 3.5% 15px;padding:0;">What follows is a quick rundown of the most important ruby-debug commands, along with a brief description of what they do. Don&#8217;t worry too much about remembering every last detail &#8212; the built-in help command will list all the available commands for you. You can also use the<span class="Apple-converted-space">&nbsp;</span><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">help &lt;commandname&gt;</code><span class="Apple-converted-space">&nbsp;</span>syntax to get help with a specific command.</p>
<ul style="list-style-position:inside;margin:0 0 0 4%;padding:0 10px 8px;">
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">backtrace</code>: Display a trace of the execution stack, similar to what is displayed when your application raises an exception.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">break/delete</code>: Display a list of breakpoints that have been set in your application. This command is also used to set new breakpoints, or delete existing ones, from within the ruby-debug shell.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">cont</code>: Leave the current debugger shell and resume execution of the application until the next breakpoint is encountered.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">irb</code>: Invoke an interactive Ruby interpreter at the current point of execution, similar to the shell used by the breakpoint library.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">list</code>: Display the code fragments surrounding the current point of execution. (We&#8217;ll make use of this command in a moment.)</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">method/method instance</code>: Explore the available class methods and instance methods, respectively.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">next/step</code>: Continue execution one step at a time &#8212; this is a huge improvement over the breakpoint library.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">p/pp</code>: Short for<span class="Apple-converted-space">&nbsp;</span><em>print</em><span class="Apple-converted-space">&nbsp;</span>and<span class="Apple-converted-space">&nbsp;</span><em>pretty print</em><span class="Apple-converted-space">&nbsp;</span>respectively, these commands can be used to evaluate Ruby expressions and display the value of variables to the console.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">quit</code>: Exit the debugger. Note that this will also exit the application server if it was invoked from the command line, as demonstrated above. To just exit the current debugging session, use<span class="Apple-converted-space">&nbsp;</span><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">cont</code>.</li>
<li><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">reload</code>: Reload the Ruby source files from disk. This can be useful if you&#8217;ve changed class definitions and want to reload them dynamically without leaving the current debugging session.</li>
</ul>
<p style="line-height:140%;margin:10px 3.5% 15px;padding:0;">For a list of all available commands and options, use the<span class="Apple-converted-space">&nbsp;</span><code style="color:rgb(153,0,0);background-color:rgb(255,255,255);font-size:115%!important;font-family:'Courier New',Courier,mono;margin:0;">help</code><span class="Apple-converted-space">&nbsp;</span>command.</p>
<p></span></p>
<p class="technorati-tags"><a href="http://technorati.com/tag/debugging" rel="tag">debugging</a>, <a href="http://technorati.com/tag/rails" rel="tag">rails</a>, <a href="http://technorati.com/tag/ruby" rel="tag">ruby</a>, <a href="http://technorati.com/tag/Debugging%20in%20rails" rel="tag">Debugging in rails</a></p>
<br />Posted in debugging, Debugging in rails, rails, Ruby Tagged: debugging, Debugging in rails, rails, Ruby <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/239/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/239/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/239/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=239&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.wordpress.com/2008/11/12/the-ruby-debug-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;Debugging in rails&#8221;</title>
		<link>http://ctrlshiftesc.wordpress.com/2008/11/12/debugging-in-rails/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2008/11/12/debugging-in-rails/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 10:17:14 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[debugging]]></category>
		<category><![CDATA[Debugging in rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.wordpress.com/2008/11/12/debugging-in-rails/</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 :&#160; Install ruby-debugger gem &#8220;sudo gem install ruby-debugger &#8211;include_dependencies&#8221; Step 2 :&#160; Dont forget to start debugging server by sayingruby script/server&#160; &#8211;debugger Step 3 :&#160; Say [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=237&amp;subd=ctrlshiftesc&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.</p>
<p>Step 1 :&nbsp; Install ruby-debugger gem &#8220;sudo gem install ruby-debugger &#8211;include_dependencies&#8221;</p>
<p>Step 2 :&nbsp; Dont forget to start debugging server by saying<br />ruby script/server&nbsp; &#8211;debugger</p>
<p>Step 3 :&nbsp; 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 />&nbsp;&nbsp;&nbsp;&nbsp; debugger<br />&nbsp;&nbsp;&nbsp;&nbsp; @object = Active.find(:all) <br />end</p>
<p>When in that case in the command line we will get a rbd : opened , where you can debug the object like @object.size etc</p>
<p>Thats it enjoy , there are some other methods like &lt;%= debug @object %&gt; , &lt;%= @object.inspect %&gt; , puts etc which I guess all of us already know abt.</p>
<p class="technorati-tags"><a href="http://technorati.com/tag/debugging" rel="tag">debugging</a>, <a href="http://technorati.com/tag/rails" rel="tag">rails</a>, <a href="http://technorati.com/tag/ruby" rel="tag">ruby</a>, <a href="http://technorati.com/tag/Debugging%20in%20rails" rel="tag">Debugging in rails</a></p>
<br />Posted in debugging, Debugging in rails, rails, Ruby Tagged: debugging, Debugging in rails, rails, Ruby <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/237/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=237&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.wordpress.com/2008/11/12/debugging-in-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>Download songs</title>
		<link>http://ctrlshiftesc.wordpress.com/2008/11/05/download-songs/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2008/11/05/download-songs/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 10:37:09 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[download songs]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[songs]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.wordpress.com/2008/11/05/download-songs/</guid>
		<description><![CDATA[If&#160; you are looking to download songs and are bored of using torrents and .in sites then try the below link. Here you shall get direct downloads and that to for free, yes I said free ,wow &#8230; Go ahead.Search and Download. http://www.theatremp3.net/Artist.php?pageNum_Artists=3&#38;totalRows_Artists=196&#38;L=English&#38;type=Individual Music, songs, download songs Posted in download songs, music, songs Tagged: download [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=234&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If&nbsp; you are looking to download songs and are bored of using torrents and .in sites then try the below link.</p>
<p>Here you shall get direct downloads and that to for free, yes I said free ,wow &#8230;</p>
<p>Go ahead.Search and Download.</p>
<p><a href="http://www.theatremp3.net/Artist.php?pageNum_Artists=3&amp;totalRows_Artists=196&amp;L=English&amp;type=Individual">http://www.theatremp3.net/Artist.php?pageNum_Artists=3&amp;totalRows_Artists=196&amp;L=English&amp;type=Individual</a></p>
<p></p>
<p class="technorati-tags"><a href="http://technorati.com/tag/Music" rel="tag">Music</a>, <a href="http://technorati.com/tag/songs" rel="tag">songs</a>, <a href="http://technorati.com/tag/download%20songs" rel="tag">download songs</a></p>
<br />Posted in download songs, music, songs Tagged: download songs, music, songs <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/234/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=234&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.wordpress.com/2008/11/05/download-songs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL and Active Record</title>
		<link>http://ctrlshiftesc.wordpress.com/2008/11/04/sql-and-active-record-2/</link>
		<comments>http://ctrlshiftesc.wordpress.com/2008/11/04/sql-and-active-record-2/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 04:43:32 +0000</pubDate>
		<dc:creator>Jon(CJ)</dc:creator>
				<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://ctrlshiftesc.wordpress.com/2008/11/04/sql-and-active-record-2/</guid>
		<description><![CDATA[find(:all, :conditions =&#62;&#8230;) method call pos = Order.find(:all,:conditions =&#62; &#8220;name = &#8216;Dave&#8217; and pay_type = &#8216;po&#8217;&#8221; )The result will be an array of all the matching rows, each neatly wrapped inan Order object. If no orders match the criteria, the array will be empty. That’s fine if your condition is predefined, but how do you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=232&amp;subd=ctrlshiftesc&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:'Times New Roman';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;">
<div style="min-height:1100px;font-family:Verdana;font-size:10pt;line-height:normal;background-color:rgb(255,255,255);margin:6px;padding:0;">
<p><b>find(:all, :conditions =&gt;&#8230;) method call</b></p>
<p><b>pos = Order.find(:all,</b><br /><b>:conditions =&gt; &#8220;name = &#8216;Dave&#8217; and pay_type = &#8216;po&#8217;&#8221; )</b><br />The result will be an array of all the matching rows, each neatly wrapped in<br />an Order object. If no orders match the criteria, the array will be empty.</p>
<p>That’s fine if your condition is predefined, but how do you handle the situation<br />where the name of the customer is set externally (perhaps coming from a web<br />form)? One way is to substitute the value of that variable into the condition<br />string.<br /><b># get the limit amount from the form</b><br /><b>name = params[:name]</b><br /><b># DON&#8217;T DO THIS!!!</b><br /><b>pos = Order.find(:all,</b><br /><b>:conditions =&gt; &#8220;name = &#8216;#{name}&#8217; and pay_type = &#8216;po&#8217;&#8221; )</p>
<p></b>its better to use</p>
<p><b>name = params[:name]<br />pos = Order.find(:all,<br />:conditions =&gt; ["name = ? and pay_type = 'po'" , name])</p>
<p></b>OR<span class="Apple-converted-space">&nbsp;</span><br />may be use placeholders<br />&nbsp;Each placeholder is of the form :name,and the corresponding values are supplied as a hash, where the keys correspond<br />to the names in the query.<br /><b>name = params[:name]<br />pay_type = params[:pay_type]<br />pos = Order.find(:all,<br />:conditions =&gt; ["name = :name and pay_type = :pay_type" ,<br />{:pay_type =&gt; pay_type, :name =&gt; name}])</p>
<p>we can also do in below fashion<span class="Apple-converted-space">&nbsp;</span><br />pos = Order.find(:all,<br />:conditions =&gt; ["name = :name and pay_type = :pay_type" , params[:order]])pos = Order.find(:all,<br />:conditions =&gt; ["name = :name and pay_type = :pay_type" , params[:order]])<br />as params is effectively a hash, you<br />can simply pass it all to the condition<br /></b></div>
<p></span></p>
<p class="technorati-tags"><a href="http://technorati.com/tag/Ruby%20on%20%20rails" rel="tag">Ruby on  rails</a>, <a href="http://technorati.com/tag/ROR" rel="tag">ROR</a>, <a href="http://technorati.com/tag/rails" rel="tag">rails</a>, <a href="http://technorati.com/tag/SQL%20and%20Active%20Record" rel="tag">SQL and Active Record</a></p>
<br />Posted in ruby on rails  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ctrlshiftesc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ctrlshiftesc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ctrlshiftesc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ctrlshiftesc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ctrlshiftesc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ctrlshiftesc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ctrlshiftesc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ctrlshiftesc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ctrlshiftesc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ctrlshiftesc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ctrlshiftesc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ctrlshiftesc.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ctrlshiftesc.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ctrlshiftesc.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ctrlshiftesc.wordpress.com&amp;blog=1644180&amp;post=232&amp;subd=ctrlshiftesc&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ctrlshiftesc.wordpress.com/2008/11/04/sql-and-active-record-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/070ccc073378648141f63e8dba78d4a4?s=96&#38;d=" medium="image">
			<media:title type="html">Jon(CJ)</media:title>
		</media:content>
	</item>
	</channel>
</rss>
