Class: Mongoid::Generators::ModelGenerator

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Base, Rails::Generators::NamedBase
Instance Chain:
self, Base, Rails::Generators::NamedBase
Inherits: Mongoid::Generators::Base
Defined in: lib/rails/generators/mongoid/model/model_generator.rb


Generator class for ::Mongoid model files.

Class Method Summary

Base - Inherited


Returns the path to the templates directory.

Instance Method Summary

Instance Method Details


Creates a model file from a template.

[ GitHub ]

# File 'lib/rails/generators/mongoid/model/model_generator.rb', line 22

def create_model_file
  template "model.rb.tt", File.join("app/models", class_path, "#{file_name}.rb")