add maintainer to the project partial

This commit is contained in:
Alexander Machehin 2014-11-27 17:21:39 +05:00
parent 13422b19b8
commit 3c5d460eb2
2 changed files with 8 additions and 1 deletions

View File

@ -2,3 +2,8 @@ json.(project, :id, :name)
json.fullname project.name_with_owner
json.url api_v1_project_path(project.id, format: :json)
json.git_url git_repo_url(project.name_with_owner)
json.maintainer do
if project.maintainer
json.partial! 'api/v1/maintainers/maintainer', maintainer: project.maintainer
end
end

View File

@ -5,7 +5,9 @@ json.project do
json.updated_at @project.updated_at.to_i
json.partial! 'api/v1/shared/owner', owner: @project.owner
json.maintainer do
json.partial! 'api/v1/shared/member', member: @project.maintainer
if @project.maintainer
json.partial! 'api/v1/maintainers/maintainer', maintainer: @project.maintainer
end
end
json.project_statistics @project.project_statistics do |statistic|