Sha256: 400ea998cd23d6941b12af39431f31d63b79249d1d8185be4f8c5bcff3b6f0f3
Contents?: true
Size: 554 Bytes
Versions: 27
Compression:
Stored size: 554 Bytes
Contents
module Virgo class MigrationsGenerator < Rails::Generators::Base source_root File.expand_path('../../../../..', __FILE__) def copy_migrations timestamp_str = Time.now.strftime("%Y%m%d%H%M%S").to_s src_path = "#{engine_root}/db/migrate/create_virgo_schema.rb" dest_path = "#{Rails.root}/db/migrate/#{timestamp_str}_create_virgo_schema.rb" unless File.directory?(dest_path) copy_file src_path, dest_path end end def engine_root File.expand_path('../../../../..', __FILE__) end end end
Version data entries
27 entries across 27 versions & 1 rubygems