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/observer | |
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/observer')
-rw-r--r-- | railties/lib/generators/rails/observer/observer_generator.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/railties/lib/generators/rails/observer/observer_generator.rb b/railties/lib/generators/rails/observer/observer_generator.rb index 9a5253a0ad..e5e1be39dc 100644 --- a/railties/lib/generators/rails/observer/observer_generator.rb +++ b/railties/lib/generators/rails/observer/observer_generator.rb @@ -1,8 +1,9 @@ module Rails module Generators class ObserverGenerator < NamedBase - # TODO Check class collisions - # class_collisions "#{class_name}Observer", "#{class_name}ObserverTest" + def check_class_collision + class_collisions "#{class_name}Observer" + end def create_observer_file template 'observer.rb', File.join('app/models', class_path, "#{file_name}_observer.rb") |