More information here: http://guides.rubyonrails.org/generators.html

And what we use here (but we do TDD, so yours will be a little different): https://github.com/thoughtbot/suspenders/blob/3e0b44de4620423e56951f5ff9e4bfce729e7548/lib/suspenders/app_builder.rb#L37-47