Class: LogFu::Generators::MongoModelGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/log_fu/mongo_model_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_mongoid_model_fileObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/generators/log_fu/mongo_model_generator.rb', line 7

def create_mongoid_model_file
  create_file "app/models/#{file_name}.rb", <<-FILE
class #{class_name}
  include LogFu::LogGeneral::MongoIdModels
  # you need add logged it method
  # example:
  # define_logged_it_methods :subject
  # TODO
end
FILE
end