Class: MongoMapper::Generators::ModelGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- MongoMapper::Generators::ModelGenerator
- Defined in:
- lib/rails/generators/mongo_mapper/model/model_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
12 13 14 |
# File 'lib/rails/generators/mongo_mapper/model/model_generator.rb', line 12 def self.source_root @source_root ||= File.("../templates", __FILE__) end |
Instance Method Details
#create_model_file ⇒ Object
16 17 18 |
# File 'lib/rails/generators/mongo_mapper/model/model_generator.rb', line 16 def create_model_file template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end |