diff options
Diffstat (limited to 'railties/bin')
-rwxr-xr-x | railties/bin/gen | 8 | ||||
-rwxr-xr-x | railties/bin/rails | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/railties/bin/gen b/railties/bin/gen index f054d4e853..6cc66ac455 100755 --- a/railties/bin/gen +++ b/railties/bin/gen @@ -14,16 +14,18 @@ else ARGV.size == 1 ARGV << "--help" end -require File.dirname(__FILE__) + '/../lib/generator' +require File.dirname(__FILE__) + '/../lib/generators' -Rails::Generators.builtin.each do |name| - require "generator/generators/#{name}/#{name}_generator" +Rails::Generators.builtin.each do |group, name| + require "generators/#{group}/#{name}/#{name}_generator" end name = ARGV.shift if klass = Thor::Util.find_by_namespace("rails:generators:#{name}") klass.start +elsif klass = Thor::Util.find_by_namespace(name) + klass.start else puts "Could not find generator #{name}." end diff --git a/railties/bin/rails b/railties/bin/rails index 57eb8809ed..538d0cbc84 100755 --- a/railties/bin/rails +++ b/railties/bin/rails @@ -9,7 +9,7 @@ end ARGV << "--help" if ARGV.empty? -require File.dirname(__FILE__) + '/../lib/generator' -require 'generator/generators/app/app_generator' +require File.dirname(__FILE__) + '/../lib/generators' +require 'generators/rails/app/app_generator' Rails::Generators::AppGenerator.start |