mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +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
|
end
|
||||||
|
|
||||||
|
def next_id
|
||||||
|
self.connection.select_value("SELECT nextval('#{self.sequence_name}')")
|
||||||
|
end
|
||||||
|
|
||||||
# rubocop: disable Metrics/AbcSize
|
# rubocop: disable Metrics/AbcSize
|
||||||
# rubocop: disable Metrics/CyclomaticComplexity
|
# rubocop: disable Metrics/CyclomaticComplexity
|
||||||
# rubocop: disable Metrics/PerceivedComplexity
|
# rubocop: disable Metrics/PerceivedComplexity
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue