Sha256: 4af4e0a03e937e1c1c0603e6446cb5d4c7d43613ef2bd0e96f64aa786544aa38
Contents?: true
Size: 648 Bytes
Versions: 10
Compression:
Stored size: 648 Bytes
Contents
require 'rails/generators' require 'rails/generators/migration' module ActiveMailer 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.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_active_mailer_tables.rb' end end end
Version data entries
10 entries across 10 versions & 1 rubygems