active_model-password 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7032cfaaa97d36b5a31b521501b89cba1f53e2a3
4
- data.tar.gz: 9d77c84a05dd700d7d1782c892ad5f8a246cfe30
3
+ metadata.gz: 5106d672b63e8fcec708ef82530e775402d491b9
4
+ data.tar.gz: 054601944e276ab4acc78dba8cf04f97490cc6e9
5
5
  SHA512:
6
- metadata.gz: 9e081ff3687ed785744c68b03f80f0dcc468b59982fe8f8434afda4a3fcb9ee2a1df50d3c7184cb5c8342156e2f8698a5b0b8633fca1c968b0d51974fad62e16
7
- data.tar.gz: 33ab627139e2ae5ebf22e1a7b7cbb431165aa9094af9ca7b81dfcbe74dd5385d10203a635a029fa150c7c040be4693de63aa64b3fa98520504b2db95a0528a84
6
+ metadata.gz: 6f22234ea3b10a20ce035c29f512a3820ab1a4a974b935f806cd28025a868c020371d2f6444da1191f077054409f3ba2bd755dfa33210670ff97c31592c595de
7
+ data.tar.gz: b85db3bbb5ef7c3b935ea54916df6be1ae9447c8c92a33031a42a4157f770cafe55307dbe2ae5a0aed0e0c6aa62ffa1bf3bedeb95b52d04652eef781f7c92a76
@@ -30,7 +30,9 @@ module ActiveModel
30
30
  def user_password
31
31
  old_password = user.password
32
32
  user.password = password
33
- errors.add(:password, user.errors[:password]) if user.invalid? and user.errors[:password].present?
33
+ if user.invalid? and user.errors[:password].present?
34
+ user.errors[:password].each { |error| errors.add(:password, error) }
35
+ end
34
36
  ensure
35
37
  user.password = old_password
36
38
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveModel
2
2
  class Password
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_model-password
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kuba Kuźma