revise_auth-jets 0.2.8 → 0.3.0

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
  SHA256:
3
- metadata.gz: fc3cb1f86e5421ef2a9a33e44be8146d39e7feb87d99e201bff9c931fc9825bb
4
- data.tar.gz: 76b7381d90d96ecda69a3cbd8df4414057d0507620b973f585008a44756d9e46
3
+ metadata.gz: 60a796b82520022a11e3865b8e78b878a5cfbff520a27e7fd45eac1e60a74217
4
+ data.tar.gz: 99bce8157842ac16506e47d78ec76fde277387058f72135bd6a6d6092d6558a3
5
5
  SHA512:
6
- metadata.gz: af86788f07d44d5ddb7b51791f47008f3e0cf20f9a51ce72920ec5d45923f2db02cc206e8c531e7663178304fa532c8507a449d7b910315c47ee974d4bca221f
7
- data.tar.gz: fefb9583b4a2feb8c93e8335b031c612adc379e9e70a55c906068b3b39684964ec4954ecc8d950477cc2c220dbc3b4f6e51f62839bcc285a0df3d30eb84067ac
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#destroy"
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.find_signed(params[:confirmation_token], purpose: :email_verification)&.confirm_email_change
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
@@ -26,7 +26,7 @@ class ReviseAuth::RegistrationsController < ReviseAuthController
26
26
  end
27
27
  end
28
28
 
29
- def destroy
29
+ def delete
30
30
  current_user.destroy
31
31
  logout
32
32
  redirect_to root_path, status: :see_other, alert: I18n.t("revise_auth.account_deleted")
@@ -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
@@ -1,3 +1,3 @@
1
1
  module ReviseAuth
2
- VERSION = "0.2.8"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revise_auth-jets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremiah Parrack