Skip to content

Instantly share code, notes, and snippets.

@elight
Created December 3, 2010 19:15
Show Gist options
  • Save elight/727392 to your computer and use it in GitHub Desktop.
Save elight/727392 to your computer and use it in GitHub Desktop.
Handling case sensitivity with Devise
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