change watch_users/praise_users/fork_users return params

This commit is contained in:
sylor_huang@126.com 2020-05-18 15:18:00 +08:00
parent b48fea51ca
commit 6256bc68b9
3 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
json.count @forks_count json.count @forks_count
json.fork_users do json.users do
json.array! @fork_users.each do |f| json.array! @fork_users.each do |f|
user = f.user user = f.user
fork_project = Project.select(:id,:name).find_by(id: f.fork_project_id) fork_project = Project.select(:id,:name).find_by(id: f.fork_project_id)

View File

@ -1,4 +1,4 @@
json.count @praises_count json.count @praises_count
json.praises do json.users do
json.partial! "/projects/list_user", collection: @praises, as: :target json.partial! "/projects/list_user", collection: @praises, as: :target
end end

View File

@ -1,4 +1,4 @@
json.count @watchers_count json.count @watchers_count
json.watchers do json.users do
json.partial! "/projects/list_user", collection: @watchers, as: :target json.partial! "/projects/list_user", collection: @watchers, as: :target
end end