diff options
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/deprecated_mass_assignment_security.rb | 10 | ||||
-rw-r--r-- | activemodel/lib/active_model/secure_password.rb | 5 |
2 files changed, 9 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/deprecated_mass_assignment_security.rb b/activemodel/lib/active_model/deprecated_mass_assignment_security.rb index 2ea69991fc..1f409c87b9 100644 --- a/activemodel/lib/active_model/deprecated_mass_assignment_security.rb +++ b/activemodel/lib/active_model/deprecated_mass_assignment_security.rb @@ -5,14 +5,16 @@ module ActiveModel module ClassMethods # :nodoc: def attr_protected(*args) raise "`attr_protected` is extracted out of Rails into a gem. " \ - "Please use new recommended protection model for params " \ - "or add `protected_attributes` to your Gemfile to use old one." + "Please use new recommended protection model for params" \ + "(strong_parameters) or add `protected_attributes` to your " \ + "Gemfile to use old one." end def attr_accessible(*args) raise "`attr_accessible` is extracted out of Rails into a gem. " \ - "Please use new recommended protection model for params " \ - "or add `protected_attributes` to your Gemfile to use old one." + "Please use new recommended protection model for params" \ + "(strong_parameters) or add `protected_attributes` to your " \ + "Gemfile to use old one." end end end 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: |