app/models/soa.rb
# Updates the serial number to the next logical one. Format of the generated
# serial is YYYYMMDDNN, where NN is the number of the change for the day.
# 01 for the first change, 02 the seconds, etc...
#
# If the serial number is 0, we opt for PowerDNS's automatic serial number
# generation
Updates the serial number to the next logical one. Format of the generated
serial is YYYYMMDDNN, where NN is the number of the change for the day.
01 for the first change, 02 the seconds, etc

If the serial number is 0, we opt for PowerDNS's automatic serial number
generation
Updates the serial number to the next logical one . Format of the generated serial is YYYYMMDDNN where NN is the number of the change for the day . 01 for the first change 02 the seconds etc If the serial number is 0 we opt for PowerDNS ' s automatic serial number generation
def update_serial
    unless Record.batch_soa_updates.nil?
      if Record.batch_soa_updates.include?( self.id )
        return
      end
      Record.batch_soa_updates << self.id
    end
    return if self.content_changed?
    date_serial = Time.now.strftime( "%Y%m%d00" ).to_i
    self.serial = if self.serial.nil? || date_serial > self.serial
        date_serial
    else
       self.serial + 1
    end
  end
def update_serial unless Record . batch_soa_updates . nil? if Record . batch_soa_updates . include? ( self . id ) return end Record . batch_soa_updates << self . id end return if self . content_changed? date_serial = Time . now . strftime ( "%Y%m%d00" ) . to_i self . serial = if self . serial . nil? || date_serial > self . serial date_serial else self . serial + 1 end end
Updates the serial number to the next logical one.
Updates the serial number to the next logical one .