blob: e7445d03a2c7a8f06ccc9a2aeee66a15972a5d38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
require 'rails/generators/active_record'
module ActiveRecord
module Generators # :nodoc:
class ObserverGenerator < Base # :nodoc:
check_class_collision :suffix => "Observer"
def create_observer_file
template 'observer.rb', File.join('app/models', class_path, "#{file_name}_observer.rb")
end
hook_for :test_framework
end
end
end
|