I am trying to implement an invitation system where authorized user can send an invitation with email to a friend. And if the invited person creates an account, the invitation sender collects points.
I am not using an auth gem such as devise or so, so I do not know how to write such a system.
I found this tutorial for an invitation system that I am currently working through which could be what you are looking for. You will need to create an Invite model and controller. Each time you need to invite a user, a new invite is created. With it, you can pass along an invitation token which can link back to the sender, ensuring the sender collects points upon successful signup. The email invitation relies on Rails ActionMailer to send, so with it you will need to incorporate a service such as sendgrid or mandrill. Good luck!
https://coderwall.com/p/rqjjca/creating-a-scoped-invitation-system-for-rails