fix seed generator length
This commit is contained in:
@@ -17,7 +17,7 @@ class SeedGenerator < ApplicationRecord
|
||||
end
|
||||
|
||||
seed = self.update_seed(model_name)
|
||||
length = 15 - prefix.length
|
||||
length = 16 - prefix.length
|
||||
prefix + seed.to_s.rjust(length, '0')
|
||||
end
|
||||
|
||||
@@ -39,7 +39,7 @@ class SeedGenerator < ApplicationRecord
|
||||
|
||||
start = self.update_seed(model_name, count)
|
||||
stop = start + count - 1
|
||||
length = 15 - prefix.length
|
||||
length = 16 - prefix.length
|
||||
(start..stop).map { |c| prefix + c.to_s.rjust(length, '0') }
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user