data_importer/app/models/github_advisory.rb

11 lines
324 B
Ruby
Raw Permalink Normal View History

2022-04-19 02:37:27 -05:00
# frozen_string_literal: true
2022-04-11 18:45:02 -05:00
2022-04-19 02:37:27 -05:00
class GithubAdvisory < ActiveRecord::Base
scope :github_reviewed, -> { where("database_specific->>'github_reviewed' = 'true'") }
scope :unreviewed, -> { where("database_specific->>'github_reviewed' = 'false'") }
def self.find_by_ghsa_id(ghsa_id)
find_by(ghsa_id: ghsa_id)
end
2022-04-11 18:45:02 -05:00
end