开发者

Creating a new rails application in rails 3

in the previous rails versions you ran

rail whatevertheappsname -d mysql 

what is the new way and how do 开发者_C百科you generate scaffolds and controllers/migratations ext..


You want:

rails new whatevertheappsname -d mysql

Generation of scaffolds/etc. is like this:

rails generate scaffold blah name:string content:text ...
rails generate migration add_field_to_blah ...

Hope that helps!


Also, might be worth checking out: http://railscasts.com/. The last few episodes have been dedicated to switching to Rails 3 and are very helpful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜