data_importer/app/models/cisa_known_exploit.rb

12 lines
213 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class CisaKnownExploit < ActiveRecord::Base
def self.find_by_id(id)
find_by(cve_id: id)
end
def self.from_year(year)
where('cve_id LIKE ?', "CVE-#{year}-%")
end
end