aboutsummaryrefslogtreecommitdiffstats
path: root/railties/bin/gen
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-06-24 15:33:38 +0200
committerJosé Valim <jose.valim@gmail.com>2009-06-25 10:39:43 +0200
commita748bb796145981c65cb6d342b4b3b02ef4c0ba0 (patch)
treeb4bdc854065da573046e831ade6ad925a5a52903 /railties/bin/gen
parent0ed602b3ef3351441b9edca59a7a1da6633a4e32 (diff)
downloadrails-a748bb796145981c65cb6d342b4b3b02ef4c0ba0.tar.gz
rails-a748bb796145981c65cb6d342b4b3b02ef4c0ba0.tar.bz2
rails-a748bb796145981c65cb6d342b4b3b02ef4c0ba0.zip
Get base_name from class_name.
Diffstat (limited to 'railties/bin/gen')
-rwxr-xr-xrailties/bin/gen4
1 files changed, 2 insertions, 2 deletions
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