data_importer/app/models/github_advisory.rb

9 lines
305 B
Ruby
Raw Normal View History

2022-04-11 18:45:02 -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
end