jweslley/rails_completion — Issue #10: Allow scaffold/model/migration generators to accept “index” and “uniq” modifiers
Author: jweslley
Created: 2012-01-21 03:26:14+00:00
State: open

For example,

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.

More info: [Rails 3.2 release notes](http://edgeguides.rubyonrails.org/3_2_release_notes.html)