How specify size of string column in a migration

I am new to RoR. How do you specify the size of a string column in a migration? The examples I've see are all of the form:

t.column :name, string

which produces a VARCHAR(255). I want a VARCHAR(40).

Thanks.

I am new to RoR. How do you specify the size of a string column in a migration? The examples I've see are all of the form:

t.column :name, string

t.column :name, :string, :length => 40

And find out this and much more at:

http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html

-Rob

Rob Biedenharn http://agileconsultingllc.com Rob@AgileConsultingLLC.com