docbrown/app/views/api/v0/shared/_organization.json.jbuilder
Jeremy Friesen a65954107f
Refactoring to add helper method (#16064)
* 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
2022-01-12 11:21:44 -05:00

6 lines
224 B
Ruby

json.organization do
json.extract!(organization, :name, :username, :slug)
json.profile_image organization.profile_image_url_for(length: 640)
json.profile_image_90 organization.profile_image_url_for(length: 90)
end