Sha256: b13d75017af2e0eceab89881a0f67b102738b1e99605097da2de6da0aecbd6c2

Contents?: true

Size: 575 Bytes

Versions: 9

Compression:

Stored size: 575 Bytes

Contents

require "rails/generators/active_record"

module Flipper
  module Generators
    class ActiveRecordGenerator < ::Rails::Generators::Base
      include ::Rails::Generators::Migration
      desc "Generates migration for flipper tables"

      source_paths << File.join(File.dirname(__FILE__), "templates")

      def create_migration_file
        migration_template "migration.rb", "db/migrate/create_flipper_tables.rb"
      end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
flipper-active_record-0.10.2 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.10.1 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.10.0 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.9.2 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.9.1 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.9.0 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.9.0.beta1 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.8.0 lib/generators/flipper/active_record_generator.rb
flipper-active_record-0.7.5 lib/generators/flipper/active_record_generator.rb