* Refactor jbuilder for articles * Refactor remaining jbuilder files * Fix specs * Remove content_truncated from response template JSON Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
7 lines
285 B
Ruby
7 lines
285 B
Ruby
json.array! @users.each do |user|
|
|
json.extract!(user, :id, :name, :username)
|
|
|
|
json.summary truncate(user.summary.presence || "Active #{community_name} author", length: 100)
|
|
json.profile_image_url ProfileImage.new(user).get(width: 90)
|
|
json.following false
|
|
end
|