Sha256: 637ceabd218439a1f24cccaef70dfad563d3f19efbb1b6e5a73dc7c23e75a370
Contents?: true
Size: 885 Bytes
Versions: 5
Compression:
Stored size: 885 Bytes
Contents
require 'rails/generators/active_record' module ActiveRecord module Generators class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) desc "add active_record merit migrations for the root objects" def self.next_migration_number(path) unless @prev_migration_nr @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i else @prev_migration_nr += 1 end @prev_migration_nr.to_s end def copy_migrations_and_model migration_template 'create_merit_actions.rb', 'db/migrate/create_merit_actions.rb' migration_template 'create_sashes.rb', 'db/migrate/create_sashes.rb' migration_template 'create_badges_sashes.rb', 'db/migrate/create_badges_sashes.rb' end end end end
Version data entries
5 entries across 5 versions & 1 rubygems