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 |
Overview
Generator class for ::Mongoid model files.
Class Method Summary
Base - Inherited
| .source_root | Returns the path to the templates directory. |
Instance Method Summary
-
#create_model_file
Creates a model file from a template.
Instance Method Details
#create_model_file
Creates a model file from a template.
# 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") end