Sha256: 0c0b7471ac53e1e64d50e1a10458e6d2b3ace17a983cd249b8a3e670d3ee95d2
Contents?: true
Size: 933 Bytes
Versions: 86
Compression:
Stored size: 933 Bytes
Contents
module EffectiveLogging module Generators class InstallGenerator < Rails::Generators::Base include Rails::Generators::Migration desc 'Creates an EffectiveLogging 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_logging.rb', 'config/initializers/effective_logging.rb' end def create_migration_file @logs_table_name = ':' + EffectiveLogging.logs_table_name.to_s migration_template ('../' * 3) + 'db/migrate/01_create_effective_logging.rb.erb', 'db/migrate/create_effective_logging.rb' end end end end
Version data entries
86 entries across 86 versions & 1 rubygems