Saturday, August 22, 2009

Scaffolding

The Model name is in the singular
Use the 'references' type to refer to an existing model.

script/generate scaffold Customer first:string last:string company:string user:references

List of valid types:
:integer
:float
:datetime
:date
:timestamp
:time
:text
:string
:binary
:boolean
:decimal

http://solutions.treypiepmeier.com/2006/12/04/rails-migration-data-types/
http://dizzy.co.uk/ruby_on_rails/cheatsheets/rails-migrations

No comments: