Class: Ampere::Generators::ModelGenerator

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#create_model_fileObject



11
12
13
# File 'lib/rails/generators/ampere/model/model_generator.rb', line 11

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

#module_namespacing(&block) ⇒ Object

This is only defined on Rails edge at the moment, so include here now as per: github.com/mongoid/mongoid/issues/744



21
22
23
# File 'lib/rails/generators/ampere/model/model_generator.rb', line 21

def module_namespacing(&block)
  yield if block
end