rails/rails — pull request #18075 by alexsoble (2014-12-17 21:45:52+00:00)
Title: Option to set migration defaults from generator

For example,

```
rails g migration CreatePosts title:string body:text published:boolean=false
```

will generate a migration for Posts where the "published" field defaults to false.

Covered with new tests in `model_generator_test.rb` and `migration_generator_test.rb`.

Discussion thread on this feature in rails-core mailing list:
https://groups.google.com/forum/#!topic/rubyonrails-core/9SNI6mkCJ-w