Class: Mongoid::Generators::ModelGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::NamedBase
- Base
- Mongoid::Generators::ModelGenerator
- Defined in:
- lib/rails/generators/mongoid/model/model_generator.rb
Overview
Generator class for Mongoid model files.
Instance Method Summary collapse
-
#create_model_file ⇒ Object
Creates a model file from a template.
Methods inherited from Base
Instance Method Details
#create_model_file ⇒ Object
Creates a model file from a template.
22 23 24 |
# 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 |