* Refactoring to add helper method Prior to this commit, we made view level calls to service modules. This refactor provides convenience methods on the model. Furthermore, it addresses a few Rubocop violations that "come along for the ride." * Ensuring cached entity squaks like User * Fixing broken spec * Fixing typo
7 lines
288 B
Ruby
7 lines
288 B
Ruby
json.array! @users.each do |user|
|
|
json.extract!(user, :id, :name, :username)
|
|
|
|
json.summary truncate(user.tag_line || t("json.author", community: community_name), length: 100)
|
|
json.profile_image_url user.profile_image_url_for(length: 90)
|
|
json.following false
|
|
end
|