Module: RailsPulse::Generators::BaseMethods::ClassMethods

Defined in:
lib/generators/rails_pulse/base_methods.rb

Overview

Generate next migration number for timestamped migrations Used by all three generators (install, upgrade, convert) This method is called by Rails generators, so it needs to be defined on the class that includes this module

Instance Method Summary collapse

Instance Method Details

#next_migration_number(path) ⇒ Object



22
23
24
25
# File 'lib/generators/rails_pulse/base_methods.rb', line 22

def next_migration_number(path)
  next_number = current_migration_number(path) + 1
  ActiveRecord::Migration.next_migration_number(next_number)
end