Sha256: b0e4735a0e5e7d94c41e5eb74429266380c9b2476cb0040620fffe9d92c314bc
Contents?: true
Size: 632 Bytes
Versions: 19
Compression:
Stored size: 632 Bytes
Contents
require 'rails/generators' require 'rails/generators/migration' module Unread class MigrationGenerator < Rails::Generators::Base include Rails::Generators::Migration desc "Generates migration for read_markers" source_root File.expand_path('../templates', __FILE__) def create_migration_file migration_template 'migration.rb', 'db/migrate/unread_migration.rb' 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 end end
Version data entries
19 entries across 19 versions & 1 rubygems