scambra/devise_invitable — pull request #181 by rywall (2012-03-08 03:28:52+00:00)
Title: Fix issue when used with devise case_insensitive_keys and strip_whitespace_keys

Devise downcases and strips keys listed in case_insensitive_keys and strip_whitespace_keys, respectively.

https://github.com/plataformatec/devise/blob/master/lib/devise/models/authenticatable.rb#L63

These before_validations don't get triggered by devise_invitable because it saves without validations. This means, for example, that an email address like CAPITALS@gmail.com can be saved to the database. That user won't be able to sign in at all since devise expects the email field in the database to be downcased and stripped!