Class: Mongoid::Generators::ObserverGenerator

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

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from Base

#module_namespacing, source_root

Instance Method Details

#create_observer_fileObject



10
11
12
# File 'lib/rails/generators/mongoid/observer/observer_generator.rb', line 10

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