diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-24 15:33:38 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-25 10:39:43 +0200 |
commit | a748bb796145981c65cb6d342b4b3b02ef4c0ba0 (patch) | |
tree | b4bdc854065da573046e831ade6ad925a5a52903 /railties/bin/gen | |
parent | 0ed602b3ef3351441b9edca59a7a1da6633a4e32 (diff) | |
download | rails-a748bb796145981c65cb6d342b4b3b02ef4c0ba0.tar.gz rails-a748bb796145981c65cb6d342b4b3b02ef4c0ba0.tar.bz2 rails-a748bb796145981c65cb6d342b4b3b02ef4c0ba0.zip |
Get base_name from class_name.
Diffstat (limited to 'railties/bin/gen')
-rwxr-xr-x | railties/bin/gen | 4 |
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 |