Some changes in Rails2.0
Posted by arjunghosh on January 7, 2008
This post is mostly as a reminder to self. There are some changes in Rails 2.0:-
1. SQLite3 is the new default database. So when a rails app is created, by default the database support, which comes preconfigured, is for SQLite3. Though I am not sure how popular this move by Rails core will be, since most of(like me) us have been using MySql for long and it has some excellent support tools. So anyways, if you still want to create a rails app with MySql support preconfigured, you simply need to do
“rails -d mysql myapp“
and everything is the same as before. “-d” is for preconfiguring selected database. So above command will work for any database adapter.
2.The command to generate RESTful scaffold -
“script/generate scaffold_resource model_name“
no longer works. Instead, you have to do this:
script/generate scaffold model_name
3. In RESTful scaffold, the view files for the various controller actions were given file names such as “edit.html.erb” instead of “edit.rhtml”. The reason is because “.rhtml” has been deprecated in Rails 2.0.
A good link I found on Rails 2.0 changes was by Brad
Of course there is the DHH blog post
.


kaushik said
hi,
cool arjun nice topic. i really appreciate u
thanks
kaushik