Sha256: 4a7b0be6863db6449f21883fb49227191bf2e7e1d2148479a80205e1d5f2cfd4
Contents?: true
Size: 810 Bytes
Versions: 1
Compression:
Stored size: 810 Bytes
Contents
require "generators/micro_service/client/client_generator" require "generators/micro_service/client/next_migration_version" require "rails/generators/migration" require "rails/generators/active_record" # Extend the HasDynamicColumnsGenerator so that it creates an AR migration module MicroService class Client < ::ActiveRecord::Base class ActiveRecordGenerator < ::MicroService::Client::Generator include Rails::Generators::Migration extend NextMigrationVersion source_paths << File.join(File.dirname(__FILE__), "templates") def create_migration_file migration_template "migration_0.0.1.rb", "db/migrate/add_micro_service_client_0_0_1_migration.rb" end def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number dirname end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
micro_service-client-0.0.1 | lib/generators/micro_service/client/active_record_generator.rb |