Bohn
Bohn

Reputation: 26929

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

Which one is the correct way?

Upvotes: 0

Views: 58

Answers (1)

Jakob S
Jakob S

Reputation: 20145

You can use either, they are equivalent. Both generate a model named FooTable using a database table called foo_tables.

Upvotes: 5

Related Questions