Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Rails 的官方站点有关于 Active Record 迁移、验证、关联和查询(读取)的良好指南,但我找不到关于 C(创建)、U(更新)、D(删除)的指南。我错过了什么吗?作者是否认为初学者应该从 API 文档中弄清楚这些?
看脚手架。试试这个作为开始:
$ rails g scaffold Foo bar:string
查看生成了哪些文件以及它们是如何工作的。