Pinterest invite system with Devise

What is the best practice with Devise 2.1 to build a simple invite system just like Pinterest?

In other words, I would like to allow new users to sign-up with an invitation form. Then, I would like that:

  1. First, Devise send a "Thanks for Joining the Fuu Waiting List" email.
  2. To finish, maybe with a cron-task every 3 hours, Devise send a "You've Been Invited to Join Fuu" email.

I'm using Devise 2.1 with confirmable module. I think devise_invitable gem is not useful in my case, because invited user should not be able to invite new user.


I asked a kindoff similar question before maybe it is of any use to you:

rails beta request signup with social media sharing reward

Basically what you want to do is store the email of the user in a "requests" model so you get a table where you can store the email and create a field type boolean with processed. This results in:

|email         |processed|    true false

Then in /lib/tasks/ create a new rake tasks that loops true all your requests and process them in batches. This is the rough Idea but it should get you started.

Rough idea to get you started: What you basically want is store wich users are signed up true your invitation system. Stackoverflow is not for complete workouts its to get you in the right direction ;) this is to complex to totally write out.


    get '/signup/:code' => "devise/registrations#new"



unless params[:code] 
   .. check if the code is correct
   .. render your form here
  .. you need an invitation code to join our site


on_create :set_processed
def set_processed
  .. set processed to true

Need Your Help

How can I export my c# code logic (if-else-loops) in to text files (e.g XML) and later import it back and run?

c# xml xslt scripting

I have these requirements coming from client every week for some new logic or verification. For which I have to code new logic (basically some if-else and loops) and launch a new build for him. I w...