Class: FurtherGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/further/further_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



8
9
10
# File 'lib/generators/further/further_generator.rb', line 8

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

Instance Method Details

#create_model_fileObject



12
13
14
15
# File 'lib/generators/further/further_generator.rb', line 12

def create_model_file
  template "further_information.rb", "app/models/further_information.rb"
  migration_template "create_further_informations.rb", "db/migrate/create_further_informations.rb"
end