0
votes

I want to invite users to different events that are in my database and my user model is managed via devise.

With devise_invitable apparently every time I want to invite a user a new record is created or I get an error if the user identified by email already exists. Both is a problem in my use case since users should get access to events based on those invitations (which is handled already) and users potentially sign up to different events with different email addresses, still all should be one account.

So is there a way to convince devise_invitable to not create a new user account at the time of the invitation but only when the invitation is accepted and there isn't a logged in user?

1

1 Answers

0
votes

Not really, Devise (and Devise_Invitable) was only intended as a registration for a User to a single service hence making the email address unique.

Have you thought of using Devise_Invitable purely as a registration service and just extending your User object to include a has_many EventRegistration attribute to store your event and email address combinations as you mentioned?