Sha256: 3b5ff32afc8ca30726a48522e059e6fa234808c7f418fd015d4687be9a80e508

Contents?: true

Size: 519 Bytes

Versions: 13

Compression:

Stored size: 519 Bytes

Contents

require "rails/generators/active_record"

module FieldTest
  module Generators
    class EventsGenerator < Rails::Generators::Base
      include ActiveRecord::Generators::Migration
      source_root File.join(__dir__, "templates")

      def copy_migration
        migration_template "events.rb", "db/migrate/create_field_test_events.rb", migration_version: migration_version
      end

      def migration_version
        "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
field_test-0.7.0 lib/generators/field_test/events_generator.rb
field_test-0.6.1 lib/generators/field_test/events_generator.rb
field_test-0.6.0 lib/generators/field_test/events_generator.rb
field_test-0.5.5 lib/generators/field_test/events_generator.rb
field_test-0.5.4 lib/generators/field_test/events_generator.rb
field_test-0.5.3 lib/generators/field_test/events_generator.rb
field_test-0.5.2 lib/generators/field_test/events_generator.rb
field_test-0.5.1 lib/generators/field_test/events_generator.rb
field_test-0.5.0 lib/generators/field_test/events_generator.rb
field_test-0.4.1 lib/generators/field_test/events_generator.rb
field_test-0.4.0 lib/generators/field_test/events_generator.rb
field_test-0.3.2 lib/generators/field_test/events_generator.rb
field_test-0.3.1 lib/generators/field_test/events_generator.rb