Sha256: 01cf99cc0b3b030ca2afbacc89fc80c48b3d7b5ed5f2d84e997a79c6646185b5

Contents?: true

Size: 797 Bytes

Versions: 11

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

require "rails/generators/base"
require "rails/generators/migration"

module RailsApiLogger
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include Rails::Generators::Migration

      source_root File.expand_path("../../templates", __FILE__)

      # Implement the required interface for Rails::Generators::Migration.
      def self.next_migration_number(dirname)
        next_migration_number = current_migration_number(dirname) + 1
        ActiveRecord::Migration.next_migration_number(next_migration_number)
      end

      desc "Copy migrations to your application."
      def copy_migrations
        migration_template "create_rails_api_logger_table.rb", "db/migrate/create_rails_api_logger_table.rb"
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rails_api_logger-0.10.0 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.4.1 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.4.0 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.3.0 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.2.5 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.2.4 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.2.3 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.2.2 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.2.1 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.2.0 lib/generators/rails_api_logger/install_generator.rb
rails_api_logger-0.1.1 lib/generators/rails_api_logger/install_generator.rb