Class: MarkMapper::Generators::ModelGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/rails/generators/mark_mapper/model/model_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject


16
17
18
# File 'lib/rails/generators/mark_mapper/model/model_generator.rb', line 16

def self.source_root
  @source_root ||= File.expand_path("../templates", __FILE__)
end

Instance Method Details

#create_model_fileObject


20
21
22
# File 'lib/rails/generators/mark_mapper/model/model_generator.rb', line 20

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