Skip to content
Browse files

Fixed validator to slice only the params we care about for password s…

…trength validation
  • Loading branch information...
1 parent 69fb40d commit 8d77c45af7954d73a6c1ab04a27212b92635c1e6 @bdmac committed Mar 11, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/active_model/validations/password_strength_validator.rb
View
2 lib/active_model/validations/password_strength_validator.rb
@@ -13,7 +13,7 @@ def validate_each(object, attribute, value)
def strength_options(options, object)
strength_options = options.dup
strength_options[:extra_dictionary_words] = extra_words_for_object(strength_options[:extra_dictionary_words], object)
- strength_options
+ strength_options.slice(:min_entropy, :use_dictionary, :min_word_length, :extra_dictionary_words)
end
def extra_words_for_object(extra_words, object)

0 comments on commit 8d77c45

Please sign in to comment.
Something went wrong with that request. Please try again.