You've created an Invitation.pending scope which isn't being used at the moment... although this seems like the place that you would want to use it, right?