authlogic_email_token 0.0.2 → 0.0.3

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: 4f3e77624dc5f9e2f5b129cd61a900028dbb7001
4
- data.tar.gz: 35bdf3ee1f6cd7e54b22aecd88993f87c031094e
3
+ metadata.gz: bb33cecc1c682954290b9ccf4836524b2aee33ce
4
+ data.tar.gz: 62e3ec5fd7424e656c5218b291b92837096217e9
5
5
  SHA512:
6
- metadata.gz: fe41c768348ff31c7c315fca8747a45bee3398fa6118a964bedfb0884e57898937f2abf3d1df8252a2c522b853340a66675aba0e41d594213881943750206fad
7
- data.tar.gz: e730d51d2451f00a47790d8c4770803135122addb4fa58a2a804ac8bd4f6ddfe174dba052d6a5dc1dc26b0e951f39e17f10ea542fdb17714010f28bb0e572a89
6
+ metadata.gz: 9931e2c5c2422619df7119d9feacc546a1cc597bafcd9b4f1350315d8c418c161a3f69745c2599472f1367d839f51acae03cf3282b54fccc1c721a46fecd3aa4
7
+ data.tar.gz: 071c2f34c38e9107bd3a8c230df518317db564e0d9ef3599f62aa0f84caf88bffab2ccadbdfddae47ee934f12d0c7cec26d6cfc4d7f49bbffde24f6b7c43b309
@@ -42,7 +42,7 @@ module Authlogic::ActsAsAuthentic::EmailToken::Confirmation
42
42
  send(self.class.activation_method) if respond_to?(self.class.activation_method)
43
43
  if read_attribute(:new_email).present?
44
44
  self.email = new_email
45
- self.new_email = nil
45
+ write_attribute :new_email, nil
46
46
  end
47
47
  reset_email_token
48
48
  end
@@ -115,15 +115,14 @@ module Authlogic::ActsAsAuthentic::EmailToken::Confirmation
115
115
  # end
116
116
  #
117
117
  # private
118
-
119
- def existing_user_params
120
- params.require(:user).permit(:new_email, :password, :password_confirmation)
121
- end
122
-
123
- def new_user_params
124
- params.require(:user).permit(:email, :password, :password_confirmation)
125
- end
126
- #
118
+ #
119
+ # def existing_user_params
120
+ # params.require(:user).permit(:new_email, :password, :password_confirmation)
121
+ # end
122
+ #
123
+ # def new_user_params
124
+ # params.require(:user).permit(:email, :password, :password_confirmation)
125
+ # end
127
126
  # end
128
127
  def maybe_deliver_email_confirmation!(controller)
129
128
  if email_changed_previously?
@@ -154,4 +153,12 @@ module Authlogic::ActsAsAuthentic::EmailToken::Confirmation
154
153
  end
155
154
  # Rails' text_field helper calls new_email_before_typecast.
156
155
  alias_method :new_email_before_type_cast, :new_email
156
+
157
+ # Like a normal attribute setter, except it is a no-op if the value is equal to the
158
+ # current value of #email.
159
+ def new_email=(e)
160
+ if e.present? and e != email
161
+ write_attribute :new_email, e
162
+ end
163
+ end
157
164
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authlogic_email_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrett Colby