Browse files

Some minor fixes

  • Loading branch information...
1 parent b6ddbfb commit 98705d88cd8ec705b80a032f8c166072b4e6fffd @chancancode chancancode committed Jan 25, 2014
@@ -60,12 +60,12 @@ def has_secure_password(options = {})
# This ensures the model has a password by checking whether the password_digest
# is present, so that this works with both new and existing records. However,
# when there is an error, the message is added to the password attribute instead
- # so that the error message will makes sense to the end-user.
+ # so that the error message will make sense to the end-user.
validate do |record|
record.errors.add(:password, :blank) unless record.password_digest.present?
- validates_confirmation_of :password, if: ->{ self.password.present? }
+ validates_confirmation_of :password, if: ->{ password.present? }
if respond_to?(:attributes_protected_by_default)
@@ -2,7 +2,6 @@
require 'models/user'
require 'models/visitor'
-require 'active_support/all'
class SecurePasswordTest < ActiveModel::TestCase
setup do
ActiveModel::SecurePassword.min_cost = true

0 comments on commit 98705d8

Please sign in to comment.