# frozen_string_literal: true 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 end