Sha256: 1a431a168bfb548e119f771abe036f4dea74647e25d3ee1f670d65e30995f76d

Contents?: true

Size: 776 Bytes

Versions: 5

Compression:

Stored size: 776 Bytes

Contents

require "generators/has_dynamic_columns/has_dynamic_columns_generator"
require "generators/has_dynamic_columns/next_migration_version"
require "rails/generators/migration"
require "rails/generators/active_record"

# Extend the HasDynamicColumnsGenerator so that it creates an AR migration
module HasDynamicColumns
	class Upgrade_0_3_5_ActiveRecordGenerator < ::HasDynamicColumnsGenerator
		include Rails::Generators::Migration
		extend NextMigrationVersion

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

		def create_migration_file
			migration_template "migration_0.3.5.rb", "db/migrate/upgrade_0_3_5_has_dynamic_columns.rb"
		end

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
has_dynamic_columns-0.3.10 lib/generators/has_dynamic_columns/upgrade_0_3_5_active_record_generator.rb
has_dynamic_columns-0.3.9 lib/generators/has_dynamic_columns/upgrade_0_3_5_active_record_generator.rb
has_dynamic_columns-0.3.8 lib/generators/has_dynamic_columns/upgrade_0_3_5_active_record_generator.rb
has_dynamic_columns-0.3.6 lib/generators/has_dynamic_columns/upgrade_0_3_5_active_record_generator.rb
has_dynamic_columns-0.3.5 lib/generators/has_dynamic_columns/upgrade_0_3_5_active_record_generator.rb