views:

37

answers:

2

I've gone over the tutorial, used the scaffold command to make a model, etc.

I noticed that it mentioned more experienced programmers would probably create all their models from scratch... What is the "appropriate" way to do so?

If it's a simple answer and I'm just Googlin' the wrong keywords, I apologize in advance.

+3  A: 

Open your text editor to app/models/modelname.rb and start typing. :)

Until you're that good though, script/generate model <modelname> is there for you: http://en.wikibooks.org/wiki/Ruby_on_Rails/Built-In_Rails_Tools/Generators

sarnold
Haha, I'll go with the generator for now :)So it's `generate model` for new, `generate migration` for changes?
Loyal Tingley
@Loyal Tingley, yes, that's the easiest way to use `generate model` and `generate migration`. (You could use the migration on its own and hand-write your model, but why not let someone else write the boilerplate. :)
sarnold
A: 

ruby script/generate model model_name