aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/generate.rb
blob: 1b3eef504ac0b4771bdba0bffa0689c510ecd0b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
require 'rails/generators'
Rails::Generators.configure!

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

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