Skip to content

Instantly share code, notes, and snippets.

@rossta
Created October 19, 2011 04:02
Show Gist options
  • Select an option

  • Save rossta/1297453 to your computer and use it in GitHub Desktop.

Select an option

Save rossta/1297453 to your computer and use it in GitHub Desktop.
Devise patch for test env to cut out expensive password calculations
# Don't need passwords in test DB to be secure, but we would like 'em to be
# fast -- and the stretches mechanism is intended to make passwords
# computationally expensive.
module Devise
module Models
module DatabaseAuthenticatable
protected
def password_digest(password)
password
end
end
end
end
Devise.setup do |config|
config.stretches = 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment