Sha256: 784bbc9f70de3ec9dac50d488631c8caa08b8e21de6a2977c2704de06a61b1dc

Contents?: true

Size: 693 Bytes

Versions: 2

Compression:

Stored size: 693 Bytes

Contents

require 'rails/generators/active_record'

module ActiveRecord
  module Generators
    # This generator will run during `rails generate token_action`.
    #
    # @see ActiveRecord::Generators::DeviseGenerator
    # @see Devise::Generators::OrmHelpers
    class TokenActionGenerator < Rails::Generators::Base
      include Rails::Generators::Migration

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

      def copy_migration_file
        migration_template 'migration.rb', 'db/migrate/create_token_action_tokens'
      end

    private

      def self.next_migration_number(number)
        ActiveRecord::Generators::Base.next_migration_number(number)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
token_action-0.0.2 lib/generators/active_record/token_action_generator.rb
token_action-0.0.1 lib/generators/active_record/token_action_generator.rb