<?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>firstruby &#187; Useful Links</title>
	<atom:link href="http://firstruby.wordpress.com/category/useful-links/feed/" rel="self" type="application/rss+xml" />
	<link>http://firstruby.wordpress.com</link>
	<description>Master ruby with us</description>
	<lastBuildDate>Wed, 30 Dec 2009 11:05:46 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='firstruby.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/eb6885b93aade6dc82939c09ff8b3819?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>firstruby &#187; Useful Links</title>
		<link>http://firstruby.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://firstruby.wordpress.com/osd.xml" title="firstruby" />
		<item>
		<title>resource_controller plugin with different associated model</title>
		<link>http://firstruby.wordpress.com/2009/12/17/resource_controller-plugin-with-different-associated-model/</link>
		<comments>http://firstruby.wordpress.com/2009/12/17/resource_controller-plugin-with-different-associated-model/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 09:30:12 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=127</guid>
		<description><![CDATA[If we use resource_controller gem/plugin in Ruby on Rails application, then as per the default configuration, it takes the associated Model name with respective Controller name as,
in app/controllers/posts_controller.rb file,
class PostsController &#60; ResourceController::Base
    resource_controller
end
This above configuration will find for Post Model. But if you want to change it to associate it to different [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=127&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If we use resource_controller gem/plugin in Ruby on Rails application, then as per the default configuration, it takes the associated Model name with respective Controller name as,</p>
<p>in app/controllers/posts_controller.rb file,<br />
<code>class PostsController &lt; ResourceController::Base<br />
    resource_controller<br />
end</code></p>
<p>This above configuration will find for Post Model. But if you want to change it to associate it to different model as &#8216;Comment&#8217; Model, then you can do it as,</p>
<p><code>class PostsController &lt; ResourceController::Base<br />
    resource_controller</code><br />
<code><br />
    private<br />
      def model_name<br />
        'comment'            # Model Name<br />
      end<br />
end</code></p>
<p>Ref. URL &#8211; http://jamesgolick.com/resource_controller/rdoc/files/__/README_rdoc.html</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=127&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/12/17/resource_controller-plugin-with-different-associated-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8216;ordinalize&#8217; in Ruby On Rails</title>
		<link>http://firstruby.wordpress.com/2009/07/21/ordinalize-in-ruby-on-rails/</link>
		<comments>http://firstruby.wordpress.com/2009/07/21/ordinalize-in-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 11:39:35 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>
		<category><![CDATA[firstruby]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=104</guid>
		<description><![CDATA[Print numbers as Cardinals in Ruby On Rails (like 1st, 2nd, 3rd, 4th and so on&#8230;.)
Rails has inbuilt function &#8211; ordinalize
(1).ordinalize =&#62; "1st"
(13).ordinalize =&#62; "13th"
(22).ordinalize =&#62; "22nd"
(100).ordinalize =&#62; "100th"
Also we can write the helper as following,
def number_to_ordinal(num)
  num = num.to_i
  if (10...20)===num
    "#{num}th"
  else
    g = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=104&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Print numbers as Cardinals in Ruby On Rails (like 1st, 2nd, 3rd, 4th and so on&#8230;.)</p>
<p>Rails has inbuilt function &#8211; <strong>ordinalize</strong></p>
<p><code>(1).ordinalize =&gt; "1st"<br />
(13).ordinalize =&gt; "13th"<br />
(22).ordinalize =&gt; "22nd"<br />
(100).ordinalize =&gt; "100th"</code></p>
<p>Also we can write the helper as following,</p>
<p><code>def number_to_ordinal(num)<br />
  num = num.to_i<br />
  if (10...20)===num<br />
    "#{num}th"<br />
  else<br />
    g = %w{ th st nd rd th th th th th th }<br />
    a = num.to_s<br />
    c=a[-1..-1].to_i<br />
    a + g[c]<br />
  end<br />
end</code></p>
<p><code>number_to_ordinal(23) =&gt; "23rd"<br />
number_to_ordinal(1) =&gt; "1st"</code></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=104&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/07/21/ordinalize-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>Backup of SVN repository</title>
		<link>http://firstruby.wordpress.com/2009/05/01/backup-of-svn-repository/</link>
		<comments>http://firstruby.wordpress.com/2009/05/01/backup-of-svn-repository/#comments</comments>
		<pubDate>Fri, 01 May 2009 08:50:01 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/2009/05/01/backup-of-svn-repository/</guid>
		<description><![CDATA[Backup of SVN repository,
    svnadmin dump myrepos &#62; dumpfile
Once you give this command, it will create the dumpfile (backup) of the SVN repo with all the LOGs.
Load the SVN dump file on server,
    svnadmin load newrepos &#60; dumpfile
Once you give this command, all the data from the dumpfile will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=101&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Backup of SVN repository,</p>
<p>    <code>svnadmin dump myrepos &gt; dumpfile</code></p>
<p>Once you give this command, it will create the dumpfile (backup) of the SVN repo with all the LOGs.</p>
<p>Load the SVN dump file on server,</p>
<p>   <code> svnadmin load newrepos &lt; dumpfile</code></p>
<p>Once you give this command, all the data from the dumpfile will be loaded/extracted with all SVN LOGs.</p>
<p>Reference URL &#8211; http://chestofbooks.com/computers/revision-control/subversion-svn/Migrating-Repository-Data-Elsewhere-Reposadmin-Maint-Migrate.html</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=101&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/05/01/backup-of-svn-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding lots of test data for RubyonRails application in few seconds</title>
		<link>http://firstruby.wordpress.com/2009/04/26/adding-lots-of-test-data-for-rubyonrails-application-in-few-seconds/</link>
		<comments>http://firstruby.wordpress.com/2009/04/26/adding-lots-of-test-data-for-rubyonrails-application-in-few-seconds/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 11:37:56 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=131</guid>
		<description><![CDATA[Sometimes we need a lots of test data. Most of the times, we use to write test data in fixtures or we may enter the data manually.
For RubyonRails application, there is a better way to add lots of test data. Yes, we can do this with the help of following gems,
sudo gem install populator
sudo gem [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=131&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sometimes we need a lots of test data. Most of the times, we use to write test data in fixtures or we may enter the data manually.</p>
<p>For RubyonRails application, there is a better way to add lots of test data. Yes, we can do this with the help of following gems,</p>
<p><code>sudo gem install populator<br />
sudo gem install faker</code></p>
<p>To insert the test (dummy) data, you can create the RAKE task or method as following,<br />
<code><br />
#lib/tasks/populate.rake<br />
namespace :db do<br />
desc "Erase and fill database"<br />
task :populate =&gt; :environment do<br />
require 'populator'<br />
require 'faker' </code></p>
<p><code> User.populate 10 do |user|<br />
user.firstname = Faker::Name.name<br />
user.lastname = Populator.words(1).titleize<br />
user.about_me = Populator.sentences(2..10)<br />
user.email   = Faker::Internet.email<br />
user.phone   = Faker::PhoneNumber.phone_number<br />
user.street  = Faker::Address.street_address<br />
user.city    = Faker::Address.city<br />
user.state   = Faker::Address.us_state_abbr<br />
user.zip     = Faker::Address.zip_code<br />
end<br />
end<br />
end</code></p>
<p>This will insert mass records into database in quick time. Also we can set up associations,<br />
We will modify above code for User&#8217;s association with Club as,</p>
<p><code>User.populate 10 do |user|<br />
user.firstname = Faker::Name.name<br />
user.lastname = Populator.words(1).titleize<br />
......<br />
user.zip     = Faker::Address.zip_code<br />
Club.populate 5 do |club|<br />
club.user_id = user.id<br />
club.name = Populator.words(3..8).titleize<br />
end<br />
end</code></p>
<p>Once you are done with writing the method, you can run the following RAKE task,<br />
<code>rake db:populate</code></p>
<p>For more methods, You can refer &#8211; http://populator.rubyforge.org/ for POPULATOR gem and http://faker.rubyforge.org/rdoc/ for FAKER gem.</p>
<p>Reference URL &#8211; http://railscasts.com/episodes/126-populating-a-database</p>
<p>Thanks,</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=131&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/04/26/adding-lots-of-test-data-for-rubyonrails-application-in-few-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuration for PostgreSQL with RubyOnRails on Windows</title>
		<link>http://firstruby.wordpress.com/2009/04/02/configuration-for-postgresql-with-rubyonrails-on-windows/</link>
		<comments>http://firstruby.wordpress.com/2009/04/02/configuration-for-postgresql-with-rubyonrails-on-windows/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 11:46:32 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=139</guid>
		<description><![CDATA[
To configure the PostgreSQL with RoR applications, we need to do following setting,
Download PostgreSQL from http://www.enterprisedb.com/products/pgdownload.do
Install following gems,
gem install postgres-pr
gem install ruby-postgres

Then modify the /config/database.yml as following for the current environment,
adapter: postgresql
encoding: unicode
database: demo_development
username: postgres
password: root
host: localhost

You are done!!  

       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=139&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div>
<p>To configure the PostgreSQL with RoR applications, we need to do following setting,</p>
<p>Download PostgreSQL from <a href="http://www.enterprisedb.com/products/pgdownload.do">http://www.enterprisedb.com/products/pgdownload.do</a></p>
<p>Install following gems,</p>
<pre>gem install postgres-pr
gem install ruby-postgres
</pre>
<p>Then modify the /config/database.yml as following for the current environment,</p>
<pre>adapter: postgresql
encoding: unicode
database: demo_development
username: postgres
password: root
host: localhost
</pre>
<p>You are done!! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</div>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=139&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/04/02/configuration-for-postgresql-with-rubyonrails-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create rails application for specific rails version ?</title>
		<link>http://firstruby.wordpress.com/2009/02/06/how-to-create-rails-application-for-specific-rails-version/</link>
		<comments>http://firstruby.wordpress.com/2009/02/06/how-to-create-rails-application-for-specific-rails-version/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 13:31:40 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=92</guid>
		<description><![CDATA[How to create rails application for specific rails version ?
If you have multiple Rails versions installed on your application and if you want to create Rails application,
rails demo
then in this case, it will create Rails application with latest version installed on our machine.
If you want to create Rails application for specific rails versions, use following [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=92&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>How to create rails application for specific rails version ?<br />
If you have multiple Rails versions installed on your application and if you want to create Rails application,</p>
<p>rails demo</p>
<p>then in this case, it will create Rails application with latest version installed on our machine.</p>
<p>If you want to create Rails application for specific rails versions, use following command</p>
<p><strong>rails _2.1.0_ demo</strong></p>
<p>demo &#8211; rails application name with version 2.1.0</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/92/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/92/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/92/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=92&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/02/06/how-to-create-rails-application-for-specific-rails-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8216;cycle&#8217; css-related feature of Rails</title>
		<link>http://firstruby.wordpress.com/2009/01/14/cycle-css-related-feature-of-rails/</link>
		<comments>http://firstruby.wordpress.com/2009/01/14/cycle-css-related-feature-of-rails/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 18:56:28 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=85</guid>
		<description><![CDATA[If you want to display the list ( of users ) with different css-class for alternate record, there is no need to check the odd-even records,
For this, Rails have awesome feature and that is &#8211; &#8216;cycle&#8217;
We can use this as,
say we have 2 css classes-blank and white. If want to apply &#8216;black&#8217; and &#8216;white&#8217; class [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=85&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you want to display the list ( of users ) with different css-class for alternate record, there is no need to check the odd-even records,</p>
<p>For this, Rails have awesome feature and that is &#8211; &#8216;cycle&#8217;</p>
<p>We can use this as,</p>
<p>say we have 2 css classes-blank and white. If want to apply &#8216;black&#8217; and &#8216;white&#8217; class for alternate user record, then we have to write the code as,</p>
<p><code>&lt;% @users.each do |user| %&gt;<br />
	&lt;li class="&lt;%= cycle('black', 'white') -%&gt;"&gt;<br />
&lt;%= user.name %&gt;&lt;/li&gt;<br />
&lt;% end %&gt;</code></p>
<p>Cool feature <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=85&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/01/14/cycle-css-related-feature-of-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating Sub Controllers in RubyOnRails</title>
		<link>http://firstruby.wordpress.com/2009/01/14/creating-sub-controllers-in-rubyonrails/</link>
		<comments>http://firstruby.wordpress.com/2009/01/14/creating-sub-controllers-in-rubyonrails/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 18:41:10 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=80</guid>
		<description><![CDATA[Previously I was adding most of the code in one controller&#8230;say if there is admin module, and there are different sections in it, then it&#8217;s better to add the code in separate controllers &#8211; sub-controllers.
Here is the way to create sub-controllers,
ruby script/generate controller admin/users
It will create users_controller.rb in /controllers/admin folder (sub-folder for controller)
Your user controller [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=80&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Previously I was adding most of the code in one controller&#8230;say if there is admin module, and there are different sections in it, then it&#8217;s better to add the code in separate controllers &#8211; sub-controllers.</p>
<p>Here is the way to create sub-controllers,</p>
<p><code>ruby script/generate controller admin/users</code></p>
<p>It will create users_controller.rb in /controllers/admin folder (sub-folder for controller)</p>
<p>Your user controller will look like,</p>
<p><code>class Admin::UsersController &lt; ApplicationController<br />
end</code></p>
<p>And to inherit the properties of the parent controller (AdminController), you can change parent controller as AdminController instead ApplicationController</p>
<p><code>class Admin::UsersController &lt; <strong>AdminController</strong><br />
end<br />
</code></p>
<p>Hope this helps.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=80&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2009/01/14/creating-sub-controllers-in-rubyonrails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>Protected: Soon Coming with complete Info&#8230;</title>
		<link>http://firstruby.wordpress.com/2008/12/23/rash/</link>
		<comments>http://firstruby.wordpress.com/2008/12/23/rash/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 07:10:27 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=72</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=72&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><form action="http://firstruby.wordpress.com/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-72">Password:<br />
<input name="post_password" id="pwbox-72" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=72&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2008/12/23/rash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
		<item>
		<title>Copy/Move files in SVN repository</title>
		<link>http://firstruby.wordpress.com/2008/12/01/copymove-files-in-svn-repository/</link>
		<comments>http://firstruby.wordpress.com/2008/12/01/copymove-files-in-svn-repository/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 13:16:46 +0000</pubDate>
		<dc:creator>firstruby</dc:creator>
				<category><![CDATA[Useful Links]]></category>

		<guid isPermaLink="false">http://firstruby.wordpress.com/?p=64</guid>
		<description><![CDATA[To copy a file/directory in working directory or in otherdirectory,
svn move SOURCE DESTINATION
if you want to move &#8216;app&#8217; folder from working directory into /trunk,
svn move app /trunk/app
it will move &#8216;app&#8217; folder in &#8216;/trunk/app&#8217; folder.
Similarly to copy the files,
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
svn copy SOURCE DESTINATION
if you want to copy &#8216;app&#8217; folder from working directory into /trunk,
svn copy app /trunk/app
it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=64&subd=firstruby&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>To copy a file/directory in working directory or in otherdirectory,</p>
<p>svn move SOURCE DESTINATION</p>
<p>if you want to move &#8216;app&#8217; folder from working directory into /trunk,</p>
<p>svn move app /trunk/app</p>
<p>it will move &#8216;app&#8217; folder in &#8216;/trunk/app&#8217; folder.</p>
<p>Similarly to copy the files,<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
svn copy SOURCE DESTINATION</p>
<p>if you want to copy &#8216;app&#8217; folder from working directory into /trunk,</p>
<p>svn copy app /trunk/app</p>
<p>it will copy &#8216;app&#8217; folder in &#8216;/trunk/app&#8217; folder.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/firstruby.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/firstruby.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/firstruby.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/firstruby.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/firstruby.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/firstruby.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/firstruby.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/firstruby.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/firstruby.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/firstruby.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=firstruby.wordpress.com&blog=520515&post=64&subd=firstruby&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://firstruby.wordpress.com/2008/12/01/copymove-files-in-svn-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/00e5161c5b9908a6e81639e34a22cf2b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">firstruby</media:title>
		</media:content>
	</item>
	</channel>
</rss>