seed_generators prefix

This commit is contained in:
Zoey
2019-06-21 11:50:48 +06:30
parent 7e987587c9
commit 9d95dc0f8e
17 changed files with 20 additions and 96 deletions

View File

@@ -13,11 +13,6 @@ class Commission < ApplicationRecord
scope :active, -> {where(is_active: true)}
private
def generate_custom_id
prefix = "COM"
if ENV["SERVER_MODE"] == 'cloud'
prefix = "CCOM"
end
self.commission_id = SeedGenerator.generate_id(self.class.name, prefix)
self.commission_id = SeedGenerator.generate_id(self.class.name, "COM")
end
end