rails g scaffold Post title:string:index author:uniq price:decimal{7,2}
will create indexes for title and author with the latter being an unique index. Some types such as decimal accept custom options. In the example, price will be a decimal column with precision and scale set to 7 and 2 respectively.
For example,
will create indexes for title and author with the latter being an unique index. Some types such as decimal accept custom options. In the example, price will be a decimal column with precision and scale set to 7 and 2 respectively.
More info: Rails 3.2 release notes