Story#108602614 - add next_id to domain class

This commit is contained in:
Vladimir Krylov 2015-12-10 12:12:01 +02:00
parent 764a8fa0d3
commit 33ee6f6256

View file

@ -221,6 +221,10 @@ class Domain < ActiveRecord::Base
)
end
def next_id
self.connection.select_value("SELECT nextval('#{self.sequence_name}')")
end
# rubocop: disable Metrics/AbcSize
# rubocop: disable Metrics/CyclomaticComplexity
# rubocop: disable Metrics/PerceivedComplexity