diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-25 11:56:18 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-25 11:56:18 +0200 |
commit | ed33c29a4e2a07c2a738ec13775c5cc0d7867b50 (patch) | |
tree | bd3c7fde46d7366adc7d87982c509fa5d9c55933 /railties/lib/generators/rails/metal | |
parent | 4573fd2e06ee9b5a68f84f085f0a10c9ad6f129b (diff) | |
download | rails-ed33c29a4e2a07c2a738ec13775c5cc0d7867b50.tar.gz rails-ed33c29a4e2a07c2a738ec13775c5cc0d7867b50.tar.bz2 rails-ed33c29a4e2a07c2a738ec13775c5cc0d7867b50.zip |
Added class collision checks.
Diffstat (limited to 'railties/lib/generators/rails/metal')
-rw-r--r-- | railties/lib/generators/rails/metal/metal_generator.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/railties/lib/generators/rails/metal/metal_generator.rb b/railties/lib/generators/rails/metal/metal_generator.rb index ba062b30be..f8833ecec3 100644 --- a/railties/lib/generators/rails/metal/metal_generator.rb +++ b/railties/lib/generators/rails/metal/metal_generator.rb @@ -1,7 +1,13 @@ -module Rails::Generators - class MetalGenerator < NamedBase - def create_file - template "metal.rb", "app/metal/#{file_name}.rb" +module Rails + module Generators + class MetalGenerator < NamedBase + def check_class_collision + class_collisions class_name + end + + def create_file + template "metal.rb", "app/metal/#{file_name}.rb" + end end end end |