1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/generators/rails/observer/observer_generator.rb
2009-06-25 11:56:18 +02:00

15 lines
365 B
Ruby

module Rails
module Generators
class ObserverGenerator < NamedBase
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")
end
add_and_invoke_test_framework_option!
end
end
end