Sha256: 13655eedd971ba1b1d7af11e903518c6af9af386964de551656a175d88c28da0
Contents?: true
Size: 924 Bytes
Versions: 9
Compression:
Stored size: 924 Bytes
Contents
require "pact_broker/api/decorators/base_decorator" require "pact_broker/api/decorators/timestamps" module PactBroker module Api module Decorators class BranchDecorator < BaseDecorator property :name link :self do | user_options | { title: "Branch", href: branch_url(represented, user_options.fetch(:base_url)) } end link "pb:latest-version" do | user_options | { title: "Latest version for branch", href: latest_version_for_branch_url(represented, user_options.fetch(:base_url)) } end include Timestamps # When this decorator is embedded in the PacticipantBranchesDecorator, # we need to eager load the pacticipants for generating the URL def self.eager_load_associations super + [:pacticipant] end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems