2012-08-17 14:40:57 +01:00
|
|
|
json.platform do |json|
|
2012-09-05 14:47:25 +01:00
|
|
|
json.(@platform, :id, :name, :description, :parent_platform_id, :released, :visibility, :platform_type, :distrib_type)
|
|
|
|
json.created_at @platform.created_at.to_i
|
|
|
|
json.updated_at @platform.updated_at.to_i
|
2012-08-17 14:40:57 +01:00
|
|
|
json.owner do |json_owner|
|
|
|
|
json_owner.(@platform.owner, :id, :name)
|
|
|
|
json_owner.type @platform.owner_type
|
2012-09-27 14:41:02 +01:00
|
|
|
json_owner.url url_for(@platform.owner)
|
2012-08-17 14:40:57 +01:00
|
|
|
end
|
2012-10-09 14:47:05 +01:00
|
|
|
json.repositories @platform.repositories do |json_repos, repo|
|
|
|
|
json_repos.(repo, :id, :name)
|
|
|
|
json_repos.url api_v1_repository_path(repo.name, :format => :json)
|
2012-09-20 16:07:06 +01:00
|
|
|
end
|
2012-08-17 14:40:57 +01:00
|
|
|
end
|
|
|
|
json.url api_v1_platform_path(@platform, :format => :json)
|