Sha256: 1a1056a8ef51c463ecfcdc4e8851feb3023cc5770e584e90501ef12f8fd7f10b
Contents?: true
Size: 891 Bytes
Versions: 26
Compression:
Stored size: 891 Bytes
Contents
require 'rails/generators' require 'rails/generators/migration' module PhocoderRails module Generators class SetupGenerator < Rails::Generators::Base include Rails::Generators::Migration def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end def self.next_migration_number(dirname) if ActiveRecord::Base.timestamped_migrations Time.new.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end def create_migration_file migration_template 'migration.rb', 'db/migrate/create_encodable_jobs.rb' end def create_config_file template 'phocodable.yml', File.join('config','phocodable.yml') end end end end
Version data entries
26 entries across 26 versions & 1 rubygems