revise_auth 0.6.0 → 0.7.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: 1de4a4179dd70dbb344db212f06a055ed6641f877a42164d70470e40e8a1bb3c
4
- data.tar.gz: c0b9d5f458248ff21f1e87566fd66258b8c564f01fdafde62ab8051ec0979390
3
+ metadata.gz: 6a6403810d3c60e03cc0e09a4a756770fe53de27701578209642bbac3c080270
4
+ data.tar.gz: a04b03a82250b048aa26a7922ce984da15dd7270b45d1e277112a22e870f3d06
5
5
  SHA512:
6
- metadata.gz: e9cd05318740e67028f89d798608bb7ee779b844321003def73c022aca05f18f82d7544af28a7020958779fc34e9bc9820eab69f5f4622ba57f66b343a469329
7
- data.tar.gz: e00041b1ec907eafae11c4b52e74807ecfa855f3ad8cd2e5e560ee6e5323c58fd4804d056ab47aa3e9380b15cc40e891ccb9fed654404d7666db927c6eb50bb1
6
+ metadata.gz: 78f5d30aa78e0ce1fc7c25b1a33cc502a780fa23d55f93f2e6a2f939cab5378659abdb68f8bf132486f4268f3b5217e886dd42cb32c77c28b7f5aa3a2aae4b31
7
+ data.tar.gz: 2cc5056ce0b8007b4fec974a9a073c1bf68ef65334fe0161f70f6b1a371d82a12eec56fc41f0f11dad8d647da3244c6d6bc48cad1b2da78ac653a31585a501b8
@@ -9,7 +9,7 @@ class ReviseAuth::RegistrationsController < ReviseAuthController
9
9
  @user = User.new(sign_up_params)
10
10
  if @user.save
11
11
  login(@user)
12
- redirect_to root_path
12
+ redirect_to resolve_after_register_path
13
13
  else
14
14
  render :new, status: :unprocessable_entity
15
15
  end
@@ -41,4 +41,8 @@ class ReviseAuth::RegistrationsController < ReviseAuthController
41
41
  def profile_params
42
42
  params.require(:user).permit(ReviseAuth.update_params)
43
43
  end
44
+
45
+ def resolve_after_register_path
46
+ try(:after_register_path) || return_to_location || root_path
47
+ end
44
48
  end
@@ -22,8 +22,4 @@ class ReviseAuth::SessionsController < ReviseAuthController
22
22
  def resolve_after_login_path
23
23
  try(:after_login_path) || return_to_location || root_path
24
24
  end
25
-
26
- def return_to_location
27
- session.delete(:user_return_to)
28
- end
29
25
  end
@@ -1,2 +1,7 @@
1
- class ReviseAuthController < ApplicationController
1
+ class ReviseAuthController < ::ApplicationController
2
+ private
3
+
4
+ def return_to_location
5
+ session.delete(:user_return_to)
6
+ end
2
7
  end
@@ -1,3 +1,3 @@
1
1
  module ReviseAuth
2
- VERSION = "0.6.0"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revise_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-01 00:00:00.000000000 Z
11
+ date: 2024-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -94,7 +94,7 @@ metadata:
94
94
  homepage_uri: https://github.com/excid3/revise_auth
95
95
  source_code_uri: https://github.com/excid3/revise_auth
96
96
  changelog_uri: https://github.com/excid3/revise_auth/blob/main/CHANGELOG.md
97
- post_install_message:
97
+ post_install_message:
98
98
  rdoc_options: []
99
99
  require_paths:
100
100
  - lib
@@ -109,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.5.9
113
- signing_key:
112
+ rubygems_version: 3.5.11
113
+ signing_key:
114
114
  specification_version: 4
115
115
  summary: Simple authentication for Ruby on Rails apps
116
116
  test_files: []