Class: DataMapper::Generators::ObserverGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/data_mapper/observer/observer_generator.rb

Instance Attribute Summary

Attributes included from Rails3Generators::MigrationHelper

#migration_number

Instance Method Summary collapse

Methods inherited from Base

source_root

Methods included from Rails3Generators::MigrationHelper

included, #run_migration

Instance Method Details

#create_observer_fileObject



8
9
10
# File 'lib/generators/data_mapper/observer/observer_generator.rb', line 8

def create_observer_file
  template 'observer.rb', File.join('app/models', class_path, "#{file_name}_observer.rb")
end