mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Reformat
This commit is contained in:
parent
2941328652
commit
c34b0e7ac4
1 changed files with 3 additions and 8 deletions
|
@ -6,9 +6,6 @@ class ReservedDomain < ActiveRecord::Base
|
|||
|
||||
validates :name, domain_name: true, uniqueness: true
|
||||
|
||||
|
||||
|
||||
|
||||
class << self
|
||||
def pw_for(domain_name)
|
||||
name_in_ascii = SimpleIDN.to_ascii(domain_name)
|
||||
|
@ -28,8 +25,6 @@ class ReservedDomain < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def name= val
|
||||
super SimpleIDN.to_unicode(val)
|
||||
end
|
||||
|
@ -49,17 +44,17 @@ class ReservedDomain < ActiveRecord::Base
|
|||
wr.json = @json = generate_json # we need @json to bind to class
|
||||
wr.save
|
||||
end
|
||||
|
||||
alias_method :update_whois_record, :generate_data
|
||||
|
||||
def generate_json
|
||||
h = HashWithIndifferentAccess.new
|
||||
h[:name] = self.name
|
||||
h[:status] = ['Reserved']
|
||||
h[:name] = self.name
|
||||
h[:status] = ['Reserved']
|
||||
h
|
||||
end
|
||||
|
||||
def remove_data
|
||||
UpdateWhoisRecordJob.enqueue name, 'reserved'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue