Sha256: 358d3b8cddec4fe72a9618a57e8e3b245daf4f271bb8c12feb5f15201832b582
Contents?: true
Size: 750 Bytes
Versions: 7
Compression:
Stored size: 750 Bytes
Contents
require 'pact_broker/db' require 'pact_broker/domain/order_versions' module PactBroker module Domain class Version < Sequel::Model set_primary_key :id one_to_many :pacts associate(:many_to_one, :pacticipant, :class => "PactBroker::Domain::Pacticipant", :key => :pacticipant_id, :primary_key => :id) one_to_many :tags, :reciprocal => :version def after_create OrderVersions.(self.pacticipant_id) end def to_s "Version: number=#{number}, pacticipant=#{pacticipant_id}" end def version_and_updated_date "Version #{number} - #{updated_at.to_time.localtime.strftime("%d/%m/%Y")}" end end Version.plugin :timestamps, :update_on_create=>true end end
Version data entries
7 entries across 7 versions & 1 rubygems