aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/generate.rb
blob: bef4c6df14888a85685e3d530e4cdbb28cf54ea2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
require 'rails/generators'
require 'active_support/core_ext/object/inclusion'

Rails::Generators.configure!

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

name = ARGV.shift
Rails::Generators.invoke name, ARGV, :behavior => :invoke, :destination_root => Rails.root