Sha256: a2df5b3bb3c83cace39b41d2efae7c4905143bbce4aa82cdcc087587cf07145d

Contents?: true

Size: 500 Bytes

Versions: 2

Compression:

Stored size: 500 Bytes

Contents

module Jive
	class Webhook < ActiveRecord::Base
		module NextMigrationVersion
			# while methods have moved around this has been the implementation
			# since ActiveRecord 3.0
			def next_migration_number(dirname)
				next_migration_number = current_migration_number(dirname) + 1
				if ActiveRecord::Base.timestamped_migrations
					[Time.now.utc.strftime("%Y%m%d%H%M%S"), format("%.14d", next_migration_number)].max
				else
					format("%.3d", next_migration_number)
				end
			end
		end
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jive-webhook-0.0.2 lib/generators/jive/webhook/next_migration_version.rb
jive-webhook-0.0.1 lib/generators/jive/webhook/next_migration_version.rb