Skip to content

Sharing any object to a group

aitor edited this page Sep 13, 2010 · 1 revision

Sharing any object to a group

tog_social comes with sharing-to-group capabilites out of the box. You can share any object to a group. You just need to add a call to the following helper and you will have a link to share any content to your group:

<%= share_with_groups_link(object_to_be_share) %>

A user can share content only to a group he is member of. By default all your groups of the current user are shown, but you can pass an optional parameter to this method and only the groups moderated by the user will be shown.

<%= share_with_groups_link(object_to_be_share, true) %>

Since this feature is developed using acts_as_shareable, you could use this to share any content to any other object your network use (for example, a project if your social network uses projects as it’s social object).

TODO

Implement this to share content between objects and not just sharing to groups.