Class: ActiveGraph::Generators::ModelGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
MigrationHelper, SourcePathHelper
Defined in:
lib/active_graph/generators/model_generator.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from MigrationHelper

#base_migration_file_name, #existing_migration, #migration_file_name, #migration_lookup_at, #migration_template

Instance Method Details

#create_model_fileObject



15
16
17
18
# File 'lib/active_graph/generators/model_generator.rb', line 15

def create_model_file
  template 'model.erb', File.join('app/models', class_path, "#{singular_name}.rb")
  migration_template 'migration.erb', 'create_'
end