rename branch, add method to model
This commit is contained in:
parent
a67f6bb2ea
commit
27f18d77ac
|
@ -7,11 +7,11 @@ module Travis::API::V3
|
||||||
serialize :config
|
serialize :config
|
||||||
serialize :payload
|
serialize :payload
|
||||||
|
|
||||||
# has_one :branch_name,
|
has_one :branch,
|
||||||
# primary_key: [:id, :branch_name]
|
primary_key: [:id, :branch_name]
|
||||||
|
|
||||||
def branch_name
|
def branch
|
||||||
read_attribute(:branch_name)
|
read_attribute(:branch)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,6 @@ require 'travis/api/v3/renderer/model_renderer'
|
||||||
module Travis::API::V3
|
module Travis::API::V3
|
||||||
class Renderer::Request < Renderer::ModelRenderer
|
class Renderer::Request < Renderer::ModelRenderer
|
||||||
representation(:minimal, :id)
|
representation(:minimal, :id)
|
||||||
representation(:standard, :id, :repository, :branch_name, :commit, :owner, :created_at, :result, :message, :event_type)
|
representation(:standard, :id, :repository, :branch, :commit, :owner, :created_at, :result, :message, :event_type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user