https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/scaffold/scaffold_generator.rb
Did you find it? If you track it, resource_generator , you will find the code that creates the route. If you select generator_resource, you will find the model generator, auxiliary generator, etc.
You will not find a single file that generates everything.
If I do not completely understand your question, and you just want to know what this command is, this:
cd your/application/directory
Rails Version <3.0.0
script/generate scaffold model_name column_name:column_type
Rails version> 3.0.0
rails g scaffold model_name column_name:column_type
source share