module JamRuby
  class FingerprintWhitelist < ActiveRecord::Base

    @@log = Logging.logger[FingerprintWhitelist]

    validates :fingerprint, presence: true, uniqueness: true
    has_many :machine_fingerprint, class_name: 'JamRuby::MachineFingerprint', foreign_key: :fingerprint

    def admin_url
      APP_CONFIG.admin_root_url + "/admin/fingerprint_whitelists/" + id
    end

    def to_s
      "#{fingerprint}"
    end
  end
end