mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 09:45:11 +02:00
Fill empty reserved domain passwords on save
This commit is contained in:
parent
89d831bb0e
commit
d9c2b992d2
4 changed files with 1058 additions and 91 deletions
|
@ -1,5 +1,10 @@
|
|||
class ReservedDomain < ActiveRecord::Base
|
||||
include Versions # version/reserved_domain_version.rb
|
||||
before_save :fill_empty_passwords
|
||||
|
||||
def fill_empty_passwords
|
||||
names.each { |k, v| names[k] = SecureRandom.hex if v.blank? }
|
||||
end
|
||||
|
||||
class << self
|
||||
def pw_for(domain_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue