Browse Source

handle when no NS is submited, just in case

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
7cfb03c314
  1. 2
      app/models/soa.rb

2
app/models/soa.rb

@ -21,7 +21,7 @@ class SOA < Record
after_initialize :disassemble_content
before_validation do
self.primary_ns ||= domain.ns_records.first.content
self.primary_ns ||= domain.ns_records.first.try(:content)
end
# This allows us to have these convenience attributes act like any other

Loading…
Cancel
Save