Merge pull request #10580 from CodeTag/master

Code cleanup for ActionDispatch::Flash#call
better error message when app name is not passed in `rails new`

Prior to this change, for the following command:

    $ rails new

we received "Options should be given after the application name" as an error message.

This is outdated and should be "Application name should be provided in arguments".
Merge pull request #10581 from shime/better-generator-error

better error message when app name is not passed in `rails new`
Code cleanup for ActionDispatch::Flash#call

Here I include a fix for the broken specs in railties as reported here
https://github.com/rails/rails/pull/10580#issuecomment-17788152