From a748bb796145981c65cb6d342b4b3b02ef4c0ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 24 Jun 2009 15:33:38 +0200 Subject: Get base_name from class_name. --- railties/bin/gen | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/bin/gen') diff --git a/railties/bin/gen b/railties/bin/gen index ad3a793610..fab4866407 100755 --- a/railties/bin/gen +++ b/railties/bin/gen @@ -10,7 +10,7 @@ end if ARGV.size == 0 puts "Please select a generator. Options: foo, bar" return -else ARGV.size == 1 +elsif ARGV.size == 1 ARGV << "--help" end @@ -22,7 +22,7 @@ end name = ARGV.shift -if klass = Thor::Util.find_by_namespace("rails:#{name}") +if klass = Thor::Util.find_by_namespace("rails:generators:#{name}") klass.start elsif klass = Thor::Util.find_by_namespace(name) klass.start -- cgit v1.2.3