revise_auth-jets 0.2.8 → 0.3.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60a796b82520022a11e3865b8e78b878a5cfbff520a27e7fd45eac1e60a74217
|
4
|
+
data.tar.gz: 99bce8157842ac16506e47d78ec76fde277387058f72135bd6a6d6092d6558a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29e42e645f8f994e5c8115206b1ec7c7972a841d891a0a10f921a8f9acf24ba2f50fcb11fdefd0668aad78881226f343b2fc4add0805bae4dfbc76d4ec408217
|
7
|
+
data.tar.gz: '0904636191cbdb182eeb4e8361062e3a93799929380f3c08550283b81acdfb066f610baacc7657cfcf8805a1c89208c4f13f53ad358364af89a98242126faae4'
|
data/app/config/routes.rb
CHANGED
@@ -12,7 +12,7 @@ Jets.application.routes.draw do
|
|
12
12
|
|
13
13
|
get "profile", to: "registrations#edit", as: :profile
|
14
14
|
patch "profile", to: "registrations#update"
|
15
|
-
delete "profile", to: "registrations#
|
15
|
+
delete "profile", to: "registrations#delete"
|
16
16
|
patch "profile/email", to: "email#update"
|
17
17
|
get "profile/password", to: "registrations#edit", as: :profile_password
|
18
18
|
patch "profile/password", to: "password#update"
|
@@ -3,7 +3,7 @@ class ReviseAuth::EmailController < ReviseAuthController
|
|
3
3
|
|
4
4
|
# GET /profile/email?confirmation_token=abcdef
|
5
5
|
def show
|
6
|
-
if User.
|
6
|
+
if User.find_by(confirmation_token: params[:confirmation_token])&.confirm_email_change
|
7
7
|
#flash[:notice] = I18n.t("revise_auth.email_confirmed")
|
8
8
|
redirect_to(user_signed_in? ? profile_path : root_path)
|
9
9
|
else
|
data/lib/revise_auth/model.rb
CHANGED
@@ -26,9 +26,8 @@ module ReviseAuth
|
|
26
26
|
|
27
27
|
# Generates a confirmation token and send email to the user
|
28
28
|
def send_confirmation_instructions
|
29
|
-
token = generate_token_for
|
30
29
|
# = breaks the query params
|
31
|
-
token.gsub("=", '')
|
30
|
+
token = generate_token_for.gsub("=", '')
|
32
31
|
self.confirmation_token = token
|
33
32
|
self.save!
|
34
33
|
ReviseAuth::Mailer.with(user: self.unconfirmed_email, token: token).confirm_email.deliver_later
|
data/lib/revise_auth/version.rb
CHANGED