Remove unused whois_records.body DB column

Part of https://github.com/internetee/rest-whois/issues/131
This commit is contained in:
Artur Beljajev 2018-11-08 00:44:19 +02:00
parent dea84915b5
commit 1a1c3c7d85
8 changed files with 1 additions and 127 deletions

View file

@ -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