Sha256: 390487986a6a35bb7a8469ead4dca20574311dbd3acef9bd4497c396be1a33b0
Contents?: true
Size: 862 Bytes
Versions: 14
Compression:
Stored size: 862 Bytes
Contents
module EffectiveStorage module Generators class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration desc 'Creates an EffectiveStorage initializer in your application.' source_root File.expand_path('../../templates', __FILE__) def self.next_migration_number(dirname) if not ActiveRecord::Base.timestamped_migrations Time.new.utc.strftime("%Y%m%d%H%M%S") else '%.3d' % (current_migration_number(dirname) + 1) end end def copy_initializer template ('../' * 3) + 'config/effective_storage.rb', 'config/initializers/effective_storage.rb' end def create_migration_file migration_template ('../' * 3) + 'db/migrate/01_create_effective_storage.rb.erb', 'db/migrate/create_effective_storage.rb' end end end end
Version data entries
14 entries across 14 versions & 1 rubygems