Created
December 3, 2010 19:15
-
-
Save elight/727392 to your computer and use it in GitHub Desktop.
Handling case sensitivity with Devise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
before_save do | |
self.email.downcase! if self.email | |
end | |
def self.send_reset_password_instructions(attributes={}) | |
attributes[:email].downcase! | |
super(attributes) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment