noosfero | communities-block: add api content (!1112)

Victor Costa gitlab at mg.gitlab.com
Mon Feb 13 14:08:05 BRST 2017


New comment for Merge Request !1112 on app/models/communities_block.rb:

https://gitlab.com/noosfero/noosfero/merge_requests/1112#note_23284599

>      owner.communities
>    end
>  
> +  def api_content(params = {})
> +    content = Api::Entities::Community.represent(profiles.limit(self.limit)).as_json
> +    content['#'] = profiles.size

Hi @TallysMartins, just trying to mantain compatibility with the template defined in some places (e.g.: https://gitlab.com/noosfero/noosfero/blob/master/app/models/profile_list_block.rb#L44)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170213/69c88b72/attachment.html>


More information about the Noosfero-dev mailing list