Module: Mobility::ActiveRecordMigrationCompatibility

Included in:
BackendGenerators::Base, InstallGenerator
Defined in:
lib/rails/generators/mobility/active_record_migration_compatibility.rb

Instance Method Summary collapse

Instance Method Details

#activerecord_migration_classObject


7
8
9
10
11
12
13
# File 'lib/rails/generators/mobility/active_record_migration_compatibility.rb', line 7

def activerecord_migration_class
  if ::ActiveRecord::Migration.respond_to?(:current_version)
    "ActiveRecord::Migration[#{::ActiveRecord::Migration.current_version}]"
  else
    "ActiveRecord::Migration"
  end
end