padrino/padrino-framework — pull request #1262 by tundramonkey (2013-04-26 06:44:00+00:00)
Title: ActiveRecord - Downcases emails for login and corrects email used in authenticate method

Fix for issue 1261: https://github.com/padrino/padrino-framework/issues/1261

All sorts of problems happen if Account emails are not stored downcased or someone tries to login expecting their KevinZAbel@example.com to work.

I force the Account model to callback to downcase the email and then also changed the authenticate model to set the incoming email from params to downcase for comparison.