Class: MetaSms::MigrationsForLoggerGenerator

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

Overview

This is a generator for SmsLogging migration It Generates (but does not run) a migration to add a sms_loggings table

Author:

  • Shobhit Dixit

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



19
20
21
# File 'lib/generators/meta_sms/migrations_for_logger_generator.rb', line 19

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

Instance Method Details

#create_migration_fileObject



15
16
17
# File 'lib/generators/meta_sms/migrations_for_logger_generator.rb', line 15

def create_migration_file
  migration_template 'create_sms_loggings.rb', 'db/migrate/create_sms_loggings.rb'
end