[英]Ruby on Rails: What is the convention (is there one?) for creating a model instance programmatically
[英]What is the convention for creating Model names that have more than one word?
rails generate model FooTable name:string
rails generate model foo_table name:string
哪一種是正確的方法?
您可以使用任何一個,它們是等效的。 這兩種生成一個名為模型FooTable
使用稱為數據庫表foo_tables
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.