Sha256: 0ce9d29e4059d96f3c291ce27c91db21ac418cdeac8a1c86f27510258ed93878
Contents?: true
Size: 889 Bytes
Versions: 19
Compression:
Stored size: 889 Bytes
Contents
require 'rails/generators/active_record' module Merit module Generators::ActiveRecord class RemoveGenerator < ::ActiveRecord::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc 'Creates a migration file to remove all traces of Merit on the DB' def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end def copy_migrations_and_model migration_template 'remove_merit_tables.erb', 'db/migrate/remove_merit_tables.rb' migration_template( 'remove_merit_fields_from_model.erb', "db/migrate/remove_merit_fields_from_#{table_name}.rb" ) end def migration_version "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end end end end
Version data entries
19 entries across 19 versions & 2 rubygems