Sha256: 3ded487e989c8f21cc9c3123dc0a109b4be6c42f7f5ba16ee93c78ab4299cdb3
Contents?: true
Size: 655 Bytes
Versions: 1
Compression:
Stored size: 655 Bytes
Contents
require 'rails/generators' module Configurable class InstallGenerator < 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.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end def create_migration_file copy_file 'configurable.yml', 'config/configurable.yml' migration_template 'migration.rb', 'db/migrate/create_configurables.rb' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
configurable_engine-0.1.0 | lib/generators/configurable_engine/install_generator.rb |