Permalink
Cannot retrieve contributors at this time
13 lines (11 sloc)
497 Bytes
|
# frozen_string_literal: true |
|
class Manifest < ApplicationRecord |
|
belongs_to :repository |
|
has_many :repository_dependencies, dependent: :delete_all |
|
|
|
scope :latest, -> { order("manifests.filepath, manifests.created_at DESC").select("DISTINCT on (manifests.filepath) *") } |
|
scope :platform, ->(platform) { where('lower(manifests.platform) = ?', platform.try(:downcase)) } |
|
scope :kind, ->(kind) { where(kind: kind) } |
|
|
|
def repository_link |
|
repository.blob_url(branch) + filepath |
|
end |
|
end |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.