Sha256: 75ed34b7141a2be32b1fbf1b58e17829eb947676eadb6748f6cd0eca9875fe0f
Contents?: true
Size: 707 Bytes
Versions: 11
Compression:
Stored size: 707 Bytes
Contents
module CanHaz module Generators class InstallGenerator < Rails::Generators::Base desc "Generates the default migrations for rails-canhaz" include Rails::Generators::Migration def self.source_root @_can_haz_source_root ||= File.expand_path("../templates", __FILE__) end def self.next_migration_number(dirname) Time.now.strftime("%Y%m%d%H%M%S") end def create_migrations Dir["#{self.class.source_root}/migrations/*.rb"].sort.each do |filepath| name = File.basename(filepath) migration_template "migrations/#{name}", "db/migrate/#{name.gsub(/^\d+_/,'')}" sleep 1 end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems