2013-07-17 13:35:36 +01:00
|
|
|
json.platform do
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'platform', platform: @platform
|
2012-10-19 15:24:28 +01:00
|
|
|
json.(@platform, :description, :parent_platform_id, :released, :visibility, :platform_type, :distrib_type)
|
2012-09-05 14:47:25 +01:00
|
|
|
json.created_at @platform.created_at.to_i
|
|
|
|
json.updated_at @platform.updated_at.to_i
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/shared/owner', owner: @platform.owner
|
2013-07-17 13:35:36 +01:00
|
|
|
json.repositories @platform.repositories do |repo|
|
|
|
|
json.(repo, :id, :name)
|
2014-01-21 04:51:49 +00:00
|
|
|
json.url api_v1_repository_path(repo.id, format: :json)
|
2012-09-20 16:07:06 +01:00
|
|
|
end
|
2013-07-17 13:35:36 +01:00
|
|
|
json.products @platform.products do |product|
|
2014-01-21 04:51:49 +00:00
|
|
|
json.partial! 'api/v1/products/product', product: product
|
2013-02-01 15:52:41 +00:00
|
|
|
end
|
|
|
|
end
|