module Scrivito class MigrationGenerator < ::Rails::Generators::NamedBase include ::Rails::Generators::Migration source_root File.expand_path('../templates', __FILE__) def self.next_migration_number(dirname) Time.now.utc.strftime('%Y%m%d%H%M%S') end def create_migration_file base_path = Scrivito::Configuration.migration_path migration_template('migration.erb', File.join(base_path, "#{file_name}.rb")) end end end