Simple Groups plugin

Plugin details

Adds a comprehensive system for adding user maintained social groups to your rails app. Both open and restricted/user-moderated groups are supported. It adds a Group model and extends the User model with a range of methods designed to make implementing the system very easy, secure and efficient.

Websitehttp://github.com/JonMidhir/simple_groups/ Repositorygit://github.com/JonMidhir/simple_groups.git Author Jon Hope Tags model, user, group, Social LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install git://github.com/JonMidhir/simple_groups.git

To install:

script/plugin install git://github.com/JonMidhir/simple_groups.git



To use:

script/generate simple_groups Group



If you wish you can rename the last parameter anything you want, but Group is probably the most appropriate! Add
--skip-migration to avoid creating the migration files.

Add this near the top of your User model:

include_simple_groups



Remember to run the migrations:

rake db:migrate




Usage
=======

These methods are available to your controllers and views after installation, many are self.explanatory!

user.groups
user.pending_groups
user.is_member_of?(group)
user.is_mod_of?(group)
user.request_membership_of(group)
user.pending_and_accepted_groups
user.membership(group)
user.leave(group)
user.become_member_of(group)


The following can be called on the group model.

group.members
group.mods
group.pending_members
group.accept_member(user)
group.pending_and_accepted_members
group.kick(user)
group.mods_online
group.members_online
group.members_offline
group.has_member?(user)

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: JonMidhir, about 1 year ago