Class: Purizumu::Generators::InstallGenerator

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

Overview

Generates the migration that creates Purizumu's translation cache table.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



14
15
16
# File 'lib/generators/purizumu/install/install_generator.rb', line 14

def self.next_migration_number(dirname)
  ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#create_migration_fileObject



18
19
20
21
22
23
# File 'lib/generators/purizumu/install/install_generator.rb', line 18

def create_migration_file
  migration_template(
    'create_purizumu_translations.rb.erb',
    'db/migrate/create_purizumu_translations.rb'
  )
end