Question about $ rails generate model Article

Should

$ rails generate model Article

create

t.string :title
t.text :body
t.datetime :published_at

in the 20110408172635_create_articles.rb file?

And if "Yes", why would they not show up in my editor?

Bruce

Enviat des del meu iPad

El 9 Apr 2011, a les 01:11, Bruce Wilson <bwilsonnow@yahoo.com> va escriure:

Should

$ rails generate model Article

create

t.string :title
t.text :body
t.datetime :published_at

in the 20110408172635_create_articles.rb file?

Nope. In order to have them generated you need to specify them in the command line:

    rails g model Article title:string body:text published_at:datetime

Note that in the command line the name goes to the left of the type, while in the modern DSL they read the other way around.