Add invite codes #261

Closed
jkostolansky wants to merge 1 commits from invite-codes into main
jkostolansky commented 2024-02-03 07:51:31 +08:00 (Migrated from github.com)

Adds a simple InviteCode model to hold active codes. New codes can be generated with the rake task:

bin/rails invite_code:generate

Check for the correct code is implemented via custom validation in the User model and is triggered only in the registration context. It can also be enabled/disabled per environment via config.invite_codes_enabled.

When a user is created, the used code is destroyed in an after_create callback.

/claim #259

Adds a simple `InviteCode` model to hold active codes. New codes can be generated with the rake task: ``` bin/rails invite_code:generate ``` Check for the correct code is implemented via custom validation in the `User` model and is triggered only in the `registration` context. It can also be enabled/disabled per environment via `config.invite_codes_enabled`. When a user is created, the used code is destroyed in an `after_create` callback. /claim #259
algora-pbc[bot] commented 2024-02-03 07:51:38 +08:00 (Migrated from github.com)
💵 To receive payouts, [sign up on Algora](https://console.algora.io/auth/signup), [link your Github account](https://console.algora.io/onboarding/solver) and [connect with Stripe/Alipay](https://console.algora.io/onboarding/solver).

Pull request closed

Sign in to join this conversation.