mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Remove unused whois_records.body
DB column
Part of https://github.com/internetee/rest-whois/issues/131
This commit is contained in:
parent
dea84915b5
commit
1a1c3c7d85
8 changed files with 1 additions and 127 deletions
|
@ -51,17 +51,10 @@ class ReservedDomain < ActiveRecord::Base
|
|||
|
||||
wr = Whois::Record.find_or_initialize_by(name: name)
|
||||
wr.json = @json = generate_json # we need @json to bind to class
|
||||
wr.body = generate_body
|
||||
wr.save
|
||||
end
|
||||
alias_method :update_whois_record, :generate_data
|
||||
|
||||
|
||||
def generate_body
|
||||
template = Rails.root.join("app/views/for_models/whois_other.erb".freeze)
|
||||
ERB.new(template.read, nil, "-").result(binding)
|
||||
end
|
||||
|
||||
def generate_json
|
||||
h = HashWithIndifferentAccess.new
|
||||
h[:name] = self.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue