devision 0.0.2.3 → 0.0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b15e07ae7382ffc1153ea795e73667c18a077ddf
4
- data.tar.gz: b36db7927617a6e1fa1f23ef4159fbe5d8d693da
3
+ metadata.gz: ef1e47b8a64d2a3f0a71dcd8aaadb46af7c5abf7
4
+ data.tar.gz: a977483f3f0b9214fb176bc73eb879f68a23c9bf
5
5
  SHA512:
6
- metadata.gz: cfcacbd189d5955be5b0950d17a7990816e5ded36a237e4dcbdf77465467ee053863665ac3fe6b9f2b3c88b51dd3b36a4f704e6c02572ef8e5860c1805baba69
7
- data.tar.gz: ffc7be29a867e9cdf4c26169a162c7bc66c8c9f3d8d7abb2f2b59ad5d69c1d733ebac36041edc50f2646f5576c15a7f43d55692a41fff045cf807a2cc610e71d
6
+ metadata.gz: 6dbc3bd762a5b07d838b57485f022569f88fcc8171bbd7dd5db621bc4ce2c1abb966d96b24262b90d96889ef5969d16815cdec66299b60c162065517c72542fb
7
+ data.tar.gz: c8970861b0bf34201a77b0a6176666185c06d8db79bd6377e78a422fb47fb56d1cf7aa8e66651fa39a53f687d956fe9dbd36860fbfa7433eb94d9b4e17370407
@@ -71,7 +71,7 @@ module Devision
71
71
  original_token = raw_confirmation_token
72
72
  saved_token = Devision.token_generator.digest(self, :confirmation_token, original_token)
73
73
 
74
- confirmable = find_or_initialize_by(confirmation_token: saved_token)
74
+ confirmable = find_or_initialize_with_error_by(confirmation_token: saved_token)
75
75
  confirmable.confirm! if confirmable.persisted?
76
76
  confirmable.confirmation_token = original_token
77
77
  confirmable
@@ -97,15 +97,6 @@ module Devision
97
97
  end
98
98
 
99
99
  module ClassMethods
100
- # Attempt to find a user by its email. If a record is found, send new
101
- # password instructions to it. If user is not found, returns a new user
102
- # with an email not found error.
103
- # Attributes must contain the user's email
104
- def send_reset_password_instructions(attributes={})
105
- recoverable = find_or_initialize_with_errors(reset_password_keys, attributes, :not_found)
106
- recoverable.send_reset_password_instructions if recoverable.persisted?
107
- recoverable
108
- end
109
100
 
110
101
  # Attempt to find a user by its reset_password_token to reset its
111
102
  # password. If a user is found and token is still valid, reset its password and automatically
@@ -116,7 +107,7 @@ module Devision
116
107
  original_token = attributes[:reset_password_token]
117
108
  reset_password_token = Devision.token_generator.digest(self, :reset_password_token, original_token)
118
109
 
119
- recoverable = find_or_initialize_with_errors(:reset_password_token, reset_password_token)
110
+ recoverable = find_or_initialize_with_error_by(:reset_password_token, reset_password_token)
120
111
 
121
112
  if recoverable.persisted?
122
113
  if recoverable.reset_password_period_valid?
@@ -8,7 +8,7 @@ module Devision
8
8
  MAJOR = 0
9
9
  MINOR = 0
10
10
  PATCH = 2
11
- PRE = 3
11
+ PRE = 4
12
12
 
13
13
  STRING = [MAJOR,MINOR,PATCH,PRE].join('.').freeze
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.3
4
+ version: 0.0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Faucett