<?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>Satish Chauhan's</title>
	<atom:link href="http://satishchauhan.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://satishchauhan.wordpress.com</link>
	<description>Ruby On Rails weblog</description>
	<lastBuildDate>Fri, 07 Sep 2007 05:13:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='satishchauhan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Satish Chauhan's</title>
		<link>http://satishchauhan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://satishchauhan.wordpress.com/osd.xml" title="Satish Chauhan&#039;s" />
	<atom:link rel='hub' href='http://satishchauhan.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to load selective fixtures to db in rails</title>
		<link>http://satishchauhan.wordpress.com/2007/08/30/how-to-load-selective-fixtures-to-db-in-rails/</link>
		<comments>http://satishchauhan.wordpress.com/2007/08/30/how-to-load-selective-fixtures-to-db-in-rails/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 12:49:49 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[fixtures]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://satishchauhan.wordpress.com/2007/08/30/how-to-load-selective-fixtures-to-db-in-rails/</guid>
		<description><![CDATA[All of you must know how to load fixtures to db rake db:fixtures:load To load a subset of your fixtures to your projects db rake db:fixtures:load FIXTURES=users,stores<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=18&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>All of you must know how to load fixtures to db</p>
<pre><span class="code">rake db:fixtures:load </span></pre>
<p>To load a subset of your fixtures to your projects db</p>
<pre><span class="code">rake db:fixtures:load FIXTURES=users,stores</span></pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=18&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/08/30/how-to-load-selective-fixtures-to-db-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Star rating in ruby on rails</title>
		<link>http://satishchauhan.wordpress.com/2007/08/24/star-rating-in-ruby-on-rails/</link>
		<comments>http://satishchauhan.wordpress.com/2007/08/24/star-rating-in-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 06:58:46 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[rating]]></category>
		<category><![CDATA[star rating]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://satishchauhan.wordpress.com/2007/08/24/star-rating-in-ruby-on-rails/</guid>
		<description><![CDATA[Recently I needed to implement star rating system for one of my project I am working on. If you are not familiar with a star rating system, its simply a method of voting using (usually) 5 stars in a row, which will change colour as you hover over them indicating the level at which to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=17&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> Recently I needed to implement star rating system for one of my project I am working on.</p>
<p>If you are not familiar with a star rating system, its simply a method of voting using (usually) 5 stars in a row, which will change colour as you hover over them indicating the level at which to rate something. You may think a simple rollover would accomplish this but difficulty arises because as you rollover each star it should stay highlighted while you light up the next one and so on until the end of the row of stars.</p>
<p>If this doesnt make much sense to you then take a look at what we are going to achieve in this article. (I will leave the server-side coding to someone more knowledgeable and we will just concentrate on the visual aspects of making this effect happen. )</p>
<p>As you can see from the demo the stars stay hovered as you rollover each one. However, as mentioned earlier, the complicated part is that as each star is hovered it should stay alight while the next one is hovered so that if you start at the left side then 1,2,3,4 and 5 stars will be alight as you traverse the row. Usually a rollover will only be active on the anchor that the pointer is currently over making previous anchors lose their focus and thus their hover effect disappear.</p>
<p><strong>Install the acts_as_rateable plugin.</strong></p>
<p>Run the following from the root of your Rails app to install the plugin.</p>
<p>script/plugin install http://juixe.com/svn/acts_as_rateable<br />
or<br />
http://rubyforge.org/projects/rateableplugin/</p>
<p><strong>Create the table(migration) to store rating into database</strong></p>
<p>class CreateRatings&lt; ActiveRecord::Migration</p>
<p>def self.up<br />
create_table :ratings, :force =&gt; true do |t|<br />
t.column :rating, :integer, :default =&gt; 0<br />
t.column :created_at, :datetime, :null =&gt; false<br />
t.column :rateable_type, :string, :limit =&gt; 15,<br />
:default =&gt; “”, :null =&gt; false<br />
t.column :rateable_id, :integer, :default =&gt; 0, :null =&gt; false<br />
t.column :user_id, :integer, :default =&gt; 0, :null =&gt; false<br />
end</p>
<p>add_index :ratings, [”user_id”], :name =&gt; “fk_ratings_user”<br />
end</p>
<p>def self.down<br />
drop_table :ratings<br />
end</p>
<p>end</p>
<p><strong>Model</strong></p>
<p>models rateable</p>
<p>I was trying to add a rating system for the model Picture. Yours can obviously be whatever you like but from here on out I’ll be using Picture. So add acts_as_rateable to your model.</p>
<p>class Picture &lt; ActiveRecord::Base<br />
acts_as_rateable<br />
&#8230;<br />
end</p>
<p><strong>Controller to handle the rating</strong><br />
class RatingController &lt; ApplicationController</p>
<p>def rate<br />
@picture = Picture.find(params[:id])<br />
Rating.delete_all(["rateable_type = 'Picture' AND rateable_id = ? AND user_id = ?",<br />
@picture.id, current_user.id])<br />
@picture.add_rating Rating.new(:rating =&gt; params[:rating],<br />
:user_id =&gt; current_user.id)<br />
end</p>
<p>end</p>
<p><strong>Views</strong></p>
<p>Create the partial /views/rating/_rating.rhtml</p>
<ol class="dp-rb">
<li class="alt"><span><span>&lt;%= number_with_precision(picture.rating, 1) %&gt;/5 Stars&lt;/p&gt;  </span></span></li>
<li><span>&lt;ul <span class="keyword">class</span><span>=</span><span class="string">&#8216;star-rating&#8217;</span><span>&gt;  </span></span></li>
<li class="alt"><span>&lt;li <span class="keyword">class</span><span>=</span><span class="string">&#8216;current-rating&#8217;</span><span> style=&#8217;width:&lt;%= (picture.rating * 30).to_i -%&gt;px;’&gt;&lt;br /&gt;  </span></span></li>
<li><span>          Currently &lt;%= number_with_precision(picture.rating, 1) %&gt;/5 Stars.  </span></li>
<li class="alt"><span>        &lt;/li&gt;  </span></li>
<li><span>&lt;li&gt;  </span></li>
<li class="alt"><span>        &lt;%= link_to_remote( <span class="string">&#8220;1&#8243;</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 1}},&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:class</span><span> =&gt; ‘one-star’, </span><span class="symbol">:name</span><span> =&gt; ‘1 star out of 5′) %&gt;  </span></span></li>
<li><span>    &lt;/li&gt;  </span></li>
<li class="alt"><span>&lt;li&gt;  </span></li>
<li><span>        &lt;%= link_to_remote( <span class="string">&#8220;2&#8243;</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 2}},&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:class</span><span> =&gt; ‘two-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘2 stars out of 5′) %&gt;  </span></span></li>
<li class="alt"><span>    &lt;/li&gt;  </span></li>
<li><span>&lt;li&gt;  </span></li>
<li class="alt"><span>        &lt;%= link_to_remote( <span class="string">&#8220;3&#8243;</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 3}},&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:class</span><span> =&gt; ‘three-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘3 stars out of 5′) %&gt;  </span></span></li>
<li><span>    &lt;/li&gt;  </span></li>
<li class="alt"><span>&lt;li&gt;  </span></li>
<li><span>        &lt;%= link_to_remote( <span class="string">&#8220;4&#8243;</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 4}},&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:class</span><span> =&gt; ‘four-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘4 stars out of 5′) %&gt;  </span></span></li>
<li class="alt"><span>    &lt;/li&gt;  </span></li>
<li><span>&lt;li&gt;  </span></li>
<li class="alt"><span>        &lt;%= link_to_remote( <span class="string">&#8220;5&#8243;</span><span>, {</span><span class="symbol">:url</span><span> =&gt; { </span><span class="symbol">:controller</span><span> =&gt; “rating”,&lt;br /&gt;  </span></span></li>
<li><span>            <span class="symbol">:action</span><span> =&gt; “rate”, </span><span class="symbol">:id</span><span> =&gt; picture.id, </span><span class="symbol">:rating</span><span> =&gt; 5}},&lt;br /&gt;  </span></span></li>
<li class="alt"><span>            <span class="symbol">:class</span><span> =&gt; ‘five-stars’, </span><span class="symbol">:name</span><span> =&gt; ‘5 stars out of 5′) %&gt;  </span></span></li>
<li><span>    &lt;/li&gt;  </span></li>
<li class="alt"><span>&lt;/ul&gt;  </span></li>
<li><span>&lt;p&gt;<br />
</span></li>
</ol>
<p><strong>A little RJS</strong></p>
<p>Create the file /views/rating/rate.rjs<br />
page.replace_html “star-ratings-block”, :partial =&gt; ‘rating/rating’, :locals =&gt; { :picture=&gt; @picture }</p>
<p>This will replace the star ratings with the partial we created previously in order to reflect any rating changes made by the submission.</p>
<p>Render the partial in one of your views.<br />
“rating/rating”, :locals =&gt; { :picture =&gt; @picture } %&gt;</p>
<p>This needs @picture(or whatver you’re going to be using) in order to function.</p>
<p><strong>Remember to add the css and image</strong><br />
/* styles for the star rater */<br />
.star-rating{<br />
list-style:none;<br />
margin: 0;<br />
padding:0;<br />
width: 150px;<br />
height: 30px;<br />
position: relative;<br />
background: url(/images/star_rating.gif) top left repeat-x;<br />
}<br />
.star-rating li{<br />
padding:0;<br />
margin:0;<br />
float: left;<br />
}<br />
.star-rating li a{<br />
display:block;<br />
width:30px;<br />
height: 30px;<br />
text-decoration: none;<br />
text-indent: -9000px;<br />
z-index: 20;<br />
position: absolute;<br />
padding: 0px;<br />
}<br />
.star-rating li a:hover{<br />
background: url(/images/star_rating.gif) left center;<br />
z-index: 2;<br />
left: 0px;<br />
border:none;<br />
}<br />
.star-rating a.one-star{<br />
left: 0px;<br />
}<br />
.star-rating a.one-star:hover{<br />
width:30px;<br />
}<br />
.star-rating a.two-stars{<br />
left:30px;<br />
}<br />
.star-rating a.two-stars:hover{<br />
width: 60px;<br />
}<br />
.star-rating a.three-stars{<br />
left: 60px;<br />
}<br />
.star-rating a.three-stars:hover{<br />
width: 90px;<br />
}<br />
.star-rating a.four-stars{<br />
left: 90px;<br />
}<br />
.star-rating a.four-stars:hover{<br />
width: 120px;<br />
}<br />
.star-rating a.five-stars{<br />
left: 120px;<br />
}<br />
.star-rating a.five-stars:hover{<br />
width: 150px;<br />
}<br />
.star-rating li.current-rating{<br />
background: url(/images/star_rating.gif) left bottom;<br />
position: absolute;<br />
height: 30px;<br />
display: block;<br />
text-indent: -9000px;<br />
z-index: 1;<br />
}</p>
<p><strong>Image for your CSS</strong></p>
<p>star_rating.gif</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=17&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/08/24/star-rating-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Paginate With Ajax</title>
		<link>http://satishchauhan.wordpress.com/2007/08/08/how-to-paginate-with-ajax/</link>
		<comments>http://satishchauhan.wordpress.com/2007/08/08/how-to-paginate-with-ajax/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 04:35:42 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[paginate]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://satishchauhan.wordpress.com/2007/08/08/how-to-paginate-with-ajax/</guid>
		<description><![CDATA[Pagination is a very common task in web application development. But sometimes we need to paginate something with ajax request. The interest to use Ajax for this is to provide a dynamic interface which doesn’t need to reload the entire page when next results(page) displayed. Ajax is really nicely integrated with Rails, and using it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=16&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Pagination is a very common task in web application development. But sometimes we need to paginate something with ajax request. The interest to use Ajax for this is to provide a dynamic interface which doesn’t need to reload the entire page when next results(page) displayed. Ajax is really nicely integrated with Rails, and using it is very easier with this great framework. To work with ajax requests your browser must be enabled to handled java script requests. I knew two methods for that problem.</p>
<p><strong>This is posted on </strong><a href="http://www.satishchauhan.com"><strong>satish&#8217;s blog</strong></a></p>
<p><strong>For more details <a href="http://satishchauhan.com" target="_blank">click here </a></strong></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=16&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/08/08/how-to-paginate-with-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
		<item>
		<title>How to import CSV file in rails</title>
		<link>http://satishchauhan.wordpress.com/2007/07/18/how-to-import-csv-file-in-rails/</link>
		<comments>http://satishchauhan.wordpress.com/2007/07/18/how-to-import-csv-file-in-rails/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 12:47:16 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[CSV]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://satishchauhan.wordpress.com/2007/07/18/how-to-import-csv-file-in-rails/</guid>
		<description><![CDATA[How to import CSV file in rails? The CSV text-file format is a common choice for both import and export when performing data migrations. What if you want to import CSV files within a Rails application? Here is the code that allow you to upload CSV data onto the MySQL database from the web interface [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=15&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to import CSV file in rails?</p>
<p>The <span class="caps">CSV</span> text-file format is a common choice for both import and export when performing data migrations. What if you want to import <span class="caps">CSV</span> files within a Rails application?</p>
<p>Here is the code that <font size="1"><font size="2">allow you to upload CSV data onto the MySQL database from the web interface</font></font><br />
This code save data direct to database without saving it to temp file</p>
<p><strong>Controller: </strong></p>
<pre>
<strong>    require</strong> 'csv'

   <strong>def csv_import </strong>
     @parsed_file=CSV::Reader.parse(params[:dump][:file])
     n=0
     @parsed_file.each  do |row|
     c=CustomerInformation.new
     c.job_title=row[1]
     c.first_name=row[2]
     c.last_name=row[3]
     <strong>if</strong> c.save
        n=n+1
        GC.start if n%50==0
     <strong>end</strong>
     flash.now[:message]="CSV Import Successful,  #{n} new</pre>
<pre>                                records added to data base"
   <strong>end</strong></pre>
<p><strong>View:</strong><br />
your view will look like</p>
<pre>
 &lt;% <strong>form_for</strong> :dump, :url=&gt;{:controller=&gt;"customer_informations",</pre>
<pre>                    :action=&gt;"csv_import"},</pre>
<pre>                    :html =&gt; { :multipart =&gt; true } do |f| -%&gt;
 &lt;table"&gt;
   &lt;tr&gt;
     &lt;td&gt;
      &lt;label for="dump_file"&gt;
        Select a CSV File :
      &lt;/label&gt;
     &lt;/td&gt;
     &lt;td &gt;
       &lt;%= f.file_field :file -%&gt;
     &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
     &lt;td colspan='2'&gt;
       &lt;%= submit_tag 'Submit' -%&gt;
     &lt;/td&gt;
   &lt;/tr&gt;
 &lt;/table&gt;
&lt;% end -%&gt;</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=15&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/07/18/how-to-import-csv-file-in-rails/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Varify Email address Format</title>
		<link>http://satishchauhan.wordpress.com/2007/07/03/varify-email-address-format/</link>
		<comments>http://satishchauhan.wordpress.com/2007/07/03/varify-email-address-format/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 11:07:02 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Regexp]]></category>
		<category><![CDATA[ror]]></category>

		<guid isPermaLink="false">http://satishchauhan.wordpress.com/2007/07/03/varify-email-address-format/</guid>
		<description><![CDATA[Varify Email address Format Useful expressions for email address validation Matches a limited version of the RFC 2822 addr-spec form. /\A(?:[\w\!\#\$\%\&#38;\'\*\+\-\/\=\?\^\`\{\&#124;\}\~]+\.)*[\w\!\#\$\%\&#38; \'\*\+\-\/\=\?\^\`\{\&#124;\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-] (?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61} [a-zA-Z0-9]?)&#124;(?:\[(?:(?:[01]?\d{1,2}&#124;2[0-4]\d&#124;25[0-5])\.){3}(?:[01] ?\d{1,2}&#124;2[0-4]\d&#124;25[0-5])\]))\Z/i satish chauhan<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=14&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h3>Varify Email address Format</h3>
<p>Useful expressions for email address validation</p>
<p>Matches a limited version of the RFC 2822 addr-spec form.</p>
<p>/\A(?:[\w\!\#\$\%\&amp;\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&amp;<br />
\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-]<br />
(?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}<br />
[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]<br />
?\d{1,2}|2[0-4]\d|25[0-5])\]))\Z/i</p>
<p><a href="http://satishchauhan.blogspot.com">satish chauhan</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=14&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/07/03/varify-email-address-format/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Multiple Checkboxes with HABTM</title>
		<link>http://satishchauhan.wordpress.com/2007/06/29/multiple-checkboxes-with-habtm/</link>
		<comments>http://satishchauhan.wordpress.com/2007/06/29/multiple-checkboxes-with-habtm/#comments</comments>
		<pubDate>Fri, 29 Jun 2007 09:36:01 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[CSV]]></category>
		<category><![CDATA[HABTM]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ror]]></category>

		<guid isPermaLink="false">http://satishchauhan.wordpress.com/2007/06/29/multiple-checkboxes-with-habtm/</guid>
		<description><![CDATA[Has and Belongs to Many with Multiple Check boxes So if you are trying to do a multiple select of checkboxes and using habtm in your project, but when you submit the form, only one value was available in your controller. While you try to edit records in database but because of some error you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=13&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Has and Belongs to Many with Multiple Check boxes</p>
<p>So if you are trying to do a multiple select of checkboxes and using habtm in your project, but when you submit the form, only one value was available in your controller. While you try to edit records in database but because of some error you get back to the pre field form and you found   that the checkboxes checked by you gone ,then here’s the solution</p>
<p><strong>Model:</strong><br />
&nbsp;&nbsp;<code>class Customer &lt; ActiveRecord::Base<br />
&nbsp;&nbsp;&nbsp;has_and_belongs_to_many :intrests<br />
&nbsp;&nbsp;end</code><br />
<strong>Controller code:</strong></p>
<p>&nbsp;&nbsp;<code>class CustomersController &lt; ApplicationController<br />
&nbsp;&nbsp;&nbsp;def create<br />
&nbsp;&nbsp;&nbsp;&nbsp;if request.post?<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@customer=Customer.new(params[:customer])<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@customer.save<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;end</code></p>
<p>&nbsp;&nbsp;&nbsp;def edit<br />
&nbsp;&nbsp;&nbsp;&nbsp;@customer=Customer.find_by_id(params[:id]) if params[:id]<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if @customer<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if request.post?<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if @customer.update_attributes(customer)<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash.now[:message]=&#8221;Update successfully &#8220;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash[:message]=&#8221;Page requested by you does not exists&#8221;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;end</p>
<p><strong>Your View:</strong><br />
<code><br />
&nbsp;&nbsp;&nbsp;&lt;% form_for :customer,  do |f| -%&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;First Name:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;%= f.text_field :first_name  -%&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;Last Name:<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;%= f.text_field :last_name -%&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;% <strong>for</strong>  intr in <strong>total_intrests</strong> -%&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;%= check_box_tag "customer[interest_ids][]", "#{intr.id}", interest(intr) -%&gt; # interest is a helper method<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;%= "#{intr.name}" -%&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;% end -%&gt;<br />
&nbsp;&nbsp;&nbsp;&lt;% end -%&gt;<br />
</code><br />
helper method<br />
<code><br />
&nbsp;&nbsp;&nbsp;def interest(i)<br />
&nbsp;&nbsp;&nbsp;&nbsp;if @customer<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@customer.interests.include?(i)<br />
&nbsp;&nbsp;&nbsp;&nbsp;else<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;false<br />
&nbsp;&nbsp;&nbsp;&nbsp;end<br />
&nbsp;&nbsp;&nbsp;end<br />
</code><br />
View generate a checkbox for every interest(all_interest=Interest.find(:all)). The name of the input is significant obviously. The trailing “[]” on the name means the end result will be the list of checked ids. This list will be stored on the @params['customer'] hash with the key ‘interest_ids’. When the controller calls @customer.update_attributes(@params[:customer]), it tries to call @customer.key= for each of the keys on @params[:customer]. What’s important to realize is that these keys don’t have to actually be attributes on the Customer model. All that’s important is that there’s a key= method on the model. Model automatically contains a “collection_ids=” method for habtm and has-many associations.</p>
<p>This method will load the objects identified by the ids and call the “interest=(list)” method on the model with the freshly loaded list. This method in turn, will compare the list to the current list of interests and delete/add interests as necessary.<span id="more-13"></span></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=13&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/06/29/multiple-checkboxes-with-habtm/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
		<item>
		<title>How to generate CSV files in Rails</title>
		<link>http://satishchauhan.wordpress.com/2007/06/28/how-to-generate-csv-files-in-rails/</link>
		<comments>http://satishchauhan.wordpress.com/2007/06/28/how-to-generate-csv-files-in-rails/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 12:30:08 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[CSV]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[ror]]></category>

		<guid isPermaLink="false">http://satishchauhan.wordpress.com/2007/06/28/how-to-generate-csv-files-in-rails/</guid>
		<description><![CDATA[Controller code : require &#8216;csv&#8217; def export_to_csv @customers=CustomerInformation.find(:all) report = StringIO.new CSV::Writer.generate(report, &#8216;,&#8217;) do &#124;title&#124; title &#60;&#60; ['Id', 'Title', 'Job Title', 'First Name', 'Last Name'] @customers.each do &#124;c&#124; title &#60;&#60; [c.id, c.title, c.job_title, c.first_name, c.last_name] end end report.rewind send_data(report.read,:type =&#62; &#8216;text/csv; charset=iso-8859-1; header=present&#8217;,:filename =&#62; &#8216;report.csv&#8217;, :disposition =&#62;&#8217;attachment&#8217;, :encoding =&#62; &#8216;utf8&#8242;) end View : &#60;% form_tag({ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=7&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Controller code :</p>
<p><span style="font-weight:bold;">require</span> &#8216;csv&#8217;</p>
<blockquote><p><strong>def export_to_csv </strong></p>
<p>@customers=CustomerInformation.find(:all)</p>
<p>report = StringIO.new<br />
CSV::Writer.generate(report, &#8216;,&#8217;) <span style="font-weight:bold;">do</span> |title|</p>
<p>title &lt;&lt; ['Id', 'Title', 'Job Title', 'First Name', 'Last Name']<br />
@customers.each <span style="font-weight:bold;">do</span> |c|<br />
title &lt;&lt; [c.id, c.title, c.job_title, c.first_name, c.last_name]<br />
<span style="font-weight:bold;">        end</span></p>
<p><span style="font-weight:bold;">end</span><br />
report.rewind<br />
send_data(report.read,:type =&gt; &#8216;text/csv; charset=iso-8859-1; header=present&#8217;,:filename =&gt; &#8216;report.csv&#8217;, :disposition =&gt;&#8217;attachment&#8217;, :encoding =&gt; &#8216;utf8&#8242;)</p>
<p><strong>end </strong></p></blockquote>
<p>View :</p>
<blockquote><p> &lt;% form_tag({ :action =&gt;  :export_to_csv })do %&gt; &lt;%= submit_tag &#8220;Export To CSV&#8221; -%&gt;</p>
<p>&lt;% end -%&gt;</p></blockquote>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=7&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/06/28/how-to-generate-csv-files-in-rails/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://satishchauhan.wordpress.com/2007/06/27/hello-world/</link>
		<comments>http://satishchauhan.wordpress.com/2007/06/27/hello-world/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 12:33:58 +0000</pubDate>
		<dc:creator>Satish Chauhan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to Satish Chauhan&#8217;s blog. This is my first post. &#60;!&#8211; Kontera ContentLink(TM);&#8211;&#62; &#60;script type=&#8221;text/javascript&#8221;&#62; var dc_AdLinkColor = &#8216;orange&#8217; ; var dc_UnitID = 14 ; var dc_PublisherID = 20113 ; var dc_adprod = &#8216;ADL&#8217; ; &#60;/script&#62; &#60;script src=&#8221;http://kona.kontera.com/javascript/lib/KonaLibInline.js&#8221; type=&#8221;text/javascript&#8221;&#62; &#60;/script&#62; &#60;!&#8211; Kontera ContentLink(TM) &#8211;&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=1&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to <a href="http://satishchauhan.com" title="satish chauhan" target="_blank">Satish Chauhan&#8217;s</a> blog. <a href="http://wordpress.com/"></a> This is my first post.</p>
<p>&lt;!&#8211; Kontera ContentLink(TM);&#8211;&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
var dc_AdLinkColor = &#8216;orange&#8217; ;<br />
var dc_UnitID = 14 ;<br />
var dc_PublisherID = 20113 ;<br />
var dc_adprod = &#8216;ADL&#8217; ;<br />
&lt;/script&gt;<br />
&lt;script<br />
src=&#8221;http://kona.kontera.com/javascript/lib/KonaLibInline.js&#8221; type=&#8221;text/javascript&#8221;&gt;<br />
&lt;/script&gt;<br />
&lt;!&#8211; Kontera ContentLink(TM) &#8211;&gt;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/satishchauhan.wordpress.com/1/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/satishchauhan.wordpress.com/1/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/satishchauhan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/satishchauhan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/satishchauhan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/satishchauhan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/satishchauhan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/satishchauhan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/satishchauhan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/satishchauhan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/satishchauhan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/satishchauhan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/satishchauhan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/satishchauhan.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/satishchauhan.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/satishchauhan.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=satishchauhan.wordpress.com&amp;blog=1293901&amp;post=1&amp;subd=satishchauhan&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://satishchauhan.wordpress.com/2007/06/27/hello-world/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/582d12b234d95f8c62680ee220fbad47?s=96&#38;d=identicon" medium="image">
			<media:title type="html">satishchauhan</media:title>
		</media:content>
	</item>
	</channel>
</rss>
