aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-17 15:21:47 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-17 18:40:01 -0200
commit0b63da9d5aad9382515cc04f840a4ad73c269d4d (patch)
tree34d060f8e131305ee967c0fc00ff02cbe5ddaaf6 /activemodel/lib
parent6c5bd10dc498a64dc30b3afd6914a4d15dcab4cd (diff)
downloadrails-0b63da9d5aad9382515cc04f840a4ad73c269d4d.tar.gz
rails-0b63da9d5aad9382515cc04f840a4ad73c269d4d.tar.bz2
rails-0b63da9d5aad9382515cc04f840a4ad73c269d4d.zip
Initialize #min_cost to avoid warning in Ruby 2.0
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/secure_password.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index 081a49f749..6644b60609 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -3,6 +3,7 @@ module ActiveModel
extend ActiveSupport::Concern
class << self; attr_accessor :min_cost; end
+ self.min_cost = false
module ClassMethods
# Adds methods to set and authenticate against a BCrypt password.
@@ -13,8 +14,8 @@ module ActiveModel
# you wish to turn off validations, pass <tt>validations: false</tt> as an
# argument. You can add more validations by hand if need be.
#
- # If you don't need the confirmation validation, just don't set any
- # value to the password_confirmation attribute and the the validation
+ # If you don't need the confirmation validation, just don't set any
+ # value to the password_confirmation attribute and the the validation
# will not be triggered.
#
# You need to add bcrypt-ruby (~> 3.0.0) to Gemfile to use #has_secure_password: