1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/commands/generate.rb

12 lines
276 B
Ruby
Raw Normal View History

require 'rails/generators'
if [nil, "-h", "--help"].include?(ARGV.first)
Rails::Generators.help 'generate'
2009-07-02 05:08:07 -04:00
exit
end
name = ARGV.shift
2011-05-26 11:59:00 -04:00
root = defined?(ENGINE_ROOT) ? ENGINE_ROOT : Rails.root
2012-10-14 06:03:39 -04:00
Rails::Generators.invoke name, ARGV, behavior: :invoke, destination_root: root