The Hitchhiker’s Guide to Ruby On Rails Galaxy

Records of my voyage through RoR Galaxy

Archive for December, 2008

Model name in RubyOnRails should ALWAYS be singular!!!

Posted by arjunghosh on December 23, 2008

Model names in RubyOnRails should be Singular. This will create Table name as corresponding Plural names.

You have got to remember that about model naming conventions in rails. . 

I know this is a very basic concept in RubyOnRails but sometimes these simple basic concepts are the ones which slip through the cracks.

Example:

> ruby script/generate model Post

This will create a Model by the name “Post” i.e. singular in english language¬†and a migration to create a table by the name “Posts” which is plural form of “Post”.

I have even put this into a pastie for easier remembarance http://pastie.org/345491

Posted in Uncategorized | Tagged: , , , , , | 7 Comments »

I am Back!!! and so many interesting changes to Rails…

Posted by arjunghosh on December 23, 2008

Yeah I know its been long since I have been away. Well lot has happened between my last journey¬† through RubyOnRail’s universe from May 28,2008 to the current date. New Rails 2.0 screencast by¬†Fabio Akita¬† which is unspired by¬†the¬†Creating a Weblog in 15 minutes¬†the original¬†screencast by David Hansson , Newer version of RubyOnRails (v 2.2.2) are out, Rails officially moved to GitHub and supports¬† Git as the VCS of choice, Rails thread safety¬†is in (though how is that actually useful ?),¬† lot of nifty changes in Rails v2.2.¬† So all in all lot of things have been happening.

I will try to be more regular here. In mean time, everyone who twitter and in New Delhi, India can check out the twitter.com/rubyonraildelhi where I have been posting regular rubyonrail updates and local information. You can find me on twitter here at @arjunghosh.

Posted in Uncategorized | Tagged: , , , , , , , | Leave a Comment »