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?
Not really,
Devise(andDevise_Invitable) was only intended as a registration for aUserto a single service hence making the email address unique.Have you thought of using
Devise_Invitablepurely as a registration service and just extending yourUserobject to include a has_manyEventRegistrationattribute to store your event and email address combinations as you mentioned?