rpush - https://github.com/rpush/rpush
Follow the steps in rpush to add the gem to your rails project
rails g model PushNotificationDevice device_type:integer:index device_token:string
class CreatePushNotificationDevices < ActiveRecord::Migration