module DbMailerRails::Generators::Helpers::MigrationHelper

Public Instance Methods

migration_destination_path() click to toggle source
# File lib/generators/db_mailer_rails/helpers/migration_helper.rb, line 13
def migration_destination_path
  File.join(destination_root, migration_path, "create_#{table_name}.rb")
end
migration_path() click to toggle source
# File lib/generators/db_mailer_rails/helpers/migration_helper.rb, line 5
def migration_path
  if Rails.version >= '5.0.3'
    db_migrate_path
  else
    'db/migrate'
  end
end
migration_version() click to toggle source
# File lib/generators/db_mailer_rails/helpers/migration_helper.rb, line 17
def migration_version
  if rails5?
    "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
  end
end