plataformatec/devise — Issue #1622: Question:
Author: jonathansimmons
Created: 2012-02-04 18:00:11+00:00
State: open

I'm writing a simple invitations system to allow users to invite other users to a group they are part of via a has_many_through Relationship.

I've overridden the devise registrations and session controller to check for the invitation and handle the user & group relationship creation accordingly. I'm stumped though on what to do if the user is already signed in. That doesn't seem to hit registration#new or session#new.

Can anyone point me in the direction of what I would need to intercept a currently signed in user and make the change to the record (ie mark the invitation used and add him to the appropriate group)?