aboutsummaryrefslogblamecommitdiffstats
path: root/railties/lib/rails/commands/generate.rb
blob: 351c59c6456d806fd11c8b33e52107bb7c90bcd2 (plain) (tree)
1
2
3
4
5
6
7
8
9
                          
 
                                             
                                   



                 
 
                                                       
                                                                              
require 'rails/generators'

if [nil, "-h", "--help"].include?(ARGV.first)
  Rails::Generators.help 'generate'
  exit
end

name = ARGV.shift

root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root
Rails::Generators.invoke name, ARGV, behavior: :invoke, destination_root: root