travis-api/lib/travis/api/v3/models/request.rb
2016-04-14 11:15:17 +02:00

18 lines
361 B
Ruby

module Travis::API::V3
class Models::Request < Model
belongs_to :commit
belongs_to :repository
belongs_to :owner, polymorphic: true
has_many :builds
serialize :config
serialize :payload
# has_one :branch_name,
# primary_key: [:id, :branch_name]
def branch_name
read_attribute(:branch_name)
end
end
end