public
Description: A simple to use plugin for creating an invite system for an app.
Homepage:
Clone URL: git://github.com/vigetlabs/acts_as_inviteable.git
name age message
file MIT-LICENSE Fri Sep 18 18:36:14 -0700 2009 Initial Commit [Brian Landau]
file README.markdown Wed Sep 23 08:04:28 -0700 2009 improve how default invitation limits are done. [Brian Landau]
file Rakefile Fri Sep 18 18:36:14 -0700 2009 Initial Commit [Brian Landau]
file about.yml Thu Nov 19 06:26:13 -0800 2009 Bump version to 1.1 [Brian Landau]
directory generators/ Thu Nov 19 06:25:05 -0800 2009 Change how mailer view directory is created, fi... [Brian Landau]
file init.rb Wed Sep 23 08:41:59 -0700 2009 Fix tests and protect from calling act_as_* met... [Brian Landau]
directory lib/ Wed Sep 23 08:41:59 -0700 2009 Fix tests and protect from calling act_as_* met... [Brian Landau]
directory test/ Wed Sep 23 08:41:59 -0700 2009 Fix tests and protect from calling act_as_* met... [Brian Landau]
README.markdown

acts_as_inviteable

A simple to use plugin for creating an invite system for an app.

Generator

Use the generator to get started:

script/generate invitations_for User

This will add 2 routes to your routes file (config/routes.rb) you may wish to edit these:

map.resource :invitation, :only => [:new, :create]
map.signup   '/signup/:invite_code', :controller => 'users', :action => 'new'

It will also add acts_as_inviteable to your User model.

After running the generator you need to run rake db:migrate to add the invitations table and invitation_limit column.

Options

By default users are allowed to invite 5 others. You can customize this by providing an option to acts_as_inviteable.
Change how you call acts_as_inviteable in your users model by adding the default_invitation_limit option:

acts_as_inviteable :default_invitation_limit => 20

Copyright (c) 2009 Brian Landau (Viget Labs), released under the MIT license