AsteriskLabs/devise_google_authenticator — pull request #27 by rreusser (2014-06-12 19:24:24+00:00)
Title: Don't redirect to displayqr if resource is not google_authenticatable

**Problem**: I want to use google authenticator with activeadmin, but as soon as I install the gem and set it up for the AdminUser model, my regular users get redirected to the displayqr page on user signup.

**Solution**: This patch checks if the particular resource is google_authenticatable before redirecting. If not, it follows default devise behavior.

I suspect there's a cleaner way to find out if a resource is configured to be :google_authenticatable, but I'm not too familiar with the internals of devise. Still, this patch makes logical sense to me. I suspect another change or two is probably necessary to prevent it from interfering with regular users.

Overall though, thanks so much! This will likely save a lot of time. Great work.

Thoughts?