/usr/lib/ruby/vendor_ruby/rails/generators/active_record/observer/observer_generator.rb is in ruby-activerecord-3.2 3.2.16-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require 'rails/generators/active_record'
module ActiveRecord
module Generators
class ObserverGenerator < Base
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
|