Sha256: 3c479d8d8e969cc83ee90878a6b3486017a02d10b959e3b40fc021b5d2f593ac

Contents?: true

Size: 574 Bytes

Versions: 2

Compression:

Stored size: 574 Bytes

Contents

require 'rails/generators'

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

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

      def create_initializer_file
        copy_file 'initializer.rb', 'config/initializers/economy.rb'
      end

      def create_migration_file
        migration_template 'migration.rb', 'db/migrate/create_exchanges.rb'
      end

      def self.next_migration_number(path)
        Time.now.utc.strftime '%Y%m%d%H%M%S'
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
economy-4.0.1.0 lib/generators/economy/install/install_generator.rb
economy-4.0.0.0 lib/generators/economy/install/install_generator.rb