views:

10

answers:

1

Does someone have a complete list of model types that be specified when generating a model scaffolding

e.g.

foo:string 
bar:text 
baz:boolean

etc...

And what do these types map to in terms of default UI elements? Text field, Text area, radio button, checkbox, etc...

+1  A: 

The attributes are SQL types, hence the following are supported:

  • :primary_key
  • :string
  • :text
  • :integer
  • :float
  • :decimal
  • :datetime
  • :timestamp
  • :time
  • :date
  • :binary
  • :boolean

This table will show you what they actually map to in the various SQL implementations supported by rails.

Bayard Randel