开发者

$ rails generate scaffold * <-what's available to go here, and where can i find it?

开发者 https://www.devze.com 2023-03-07 00:56 出处:网络
so, finding tutorials around the internet provides some of the different types of scaffold available, like:

so, finding tutorials around the internet provides some of the different types of scaffold available, like:

$ rails generate scaffold Post

$ rails generate scaffold Club

(Answered)1)where can i find a list of the scaff开发者_开发知识库olds available to a standard rails 3 install? possibly with descriptions/screenshots?

(Answered)2)is there a recommended place for community provided scaffolds?

3)what data types can i use for the variables created with scaffolding? for instance, is there a date datatype? float? any ruby datatype?

4)where do i go to find this documentation? i've been searching for info on scaffolding w/o much success, what should i be looking for?


The stuff that goes after scaffold is the name of the model you want to create and optionally its properties. The rails scaffold generator will then create a Model class, Migration, Controller, basic Views and Route entry. So in your two examples it will create scaffolding for a model called Post and another one for a model called Club. You can name these whatever you want e.g.

rails generate scaffold MyModel.

Best resource to start is the getting started guide: http://guides.rubyonrails.org/getting_started.html

0

精彩评论

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