cartodb/app/models/permission/permission_organization_presenter.rb

17 lines
293 B
Ruby
Raw Normal View History

2020-06-15 10:58:47 +08:00
module CartoDB
class PermissionOrganizationPresenter
def decorate(org_id)
org = Organization.where(id: org_id).first
return {} if org.nil?
{
id: org.id,
name: org.name,
avatar_url: org.avatar_url
}
end
end
end