mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Story#108602614 - add next_id to domain class
This commit is contained in:
parent
764a8fa0d3
commit
33ee6f6256
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue