Sha256: fdda797a0485924f5ad460530a0f66b14e575183973a457eae8d04702db17cc3
Contents?: true
Size: 727 Bytes
Versions: 15
Compression:
Stored size: 727 Bytes
Contents
require 'rails/generators/active_record' module Merit module Generators::ActiveRecord class MeritGenerator < ::ActiveRecord::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc 'add active_record merit migrations' def self.next_migration_number(path) ActiveRecord::Generators::Base.next_migration_number(path) end def copy_migrations_and_model migration_template 'add_merit_fields_to_model.erb', "db/migrate/add_merit_fields_to_#{table_name}.rb" end def migration_version "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end end end end
Version data entries
15 entries across 15 versions & 1 rubygems