scambra/devise_invitable — pull request #211 by Empact (2012-06-23 05:55:57+00:00)
Title: Allow the user to declare config.invited_by_class_name, which makes the invited_by association non-polymorphic

I'm using role-based authorization with a single model, so it's always User#invited_by a User. This enables the associations and database to better reflect that.

A few possible improvements which could be made:

Ability to declare inviter class name on a per-resource_name basis.
Reflecting the config setting in the generated migrations

Finally, I ran into trouble accessing the config var through self.class, so I went straight through Devise.config.