12 lines
213 B
Ruby
12 lines
213 B
Ruby
|
# 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
|