def process_invite_token(new_user = nil)
      new_user = user_instance_variable if new_user.nil?
      token = params[:invite_token]
      new_user.claim_invite token if !token.nil? && !new_user.nil?
    end
def process_invite_token(new_user = nil)
      new_user = user_instance_variable if new_user.nil?
      token = params[:invite_token]
      new_user.claim_invite token if !token.nil? && !new_user.nil?
    end
Check for an invitation token and process the invite. If an invitation is found, the
 user claims the invite.

 Use this only when creating a new user. Invoke manually or from an after_action:

     after_action :process_invite, only: [:create]

 Invoke with new_user, or set an instance variable with the standard 'underscore' name of your user model class.
 For example, if your user model is UserProfile, this method will check for @user_profile.