I know I can easily create a model with this one line. Now suppose I want to add an index on username. How can I do so with one line without going to edit the migration file manually?
script/rails generate model TwitterUser username:string num_followers:integer num_following:integer bio:string location:string image:string num_tweets:integer website:string
Rails version? New in 3.2, would be this:
rails generate model TwitterUser username:string:index num_followers:integer ...
You use scrip/rails generate
so not sure if this helps you