Class: Scripturable::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/scripturable/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



7
8
9
# File 'lib/generators/scripturable/install_generator.rb', line 7

def self.next_migration_number(path)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end

Instance Method Details

#create_model_fileObject



11
12
13
14
15
# File 'lib/generators/scripturable/install_generator.rb', line 11

def create_model_file
  template "scripture_reference.rb", "app/models/scripture_reference.rb"
  template "scripture_verse.rb", "app/models/scripture_verse.rb"
  migration_template "create_scripture_references.rb", "db/migrate/create_scripture_references.rb"
end