tramway-auth 1.2 → 1.2.1
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: 22b1505238d191f5a627db8787628879d1a20520261a9c4d94508134114162d4
|
4
|
+
data.tar.gz: 5bf1ee01aefa1d8113086d99b6653eb1598cd61d995c2b07d6113377f122cd45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d96c01edb04bff866fae0f9cc125720a3397150980f59056cf34e84335a357ced1f4add6932e783bc7267a100407620ca0d0b3706f924eb3e5738612eb76c19
|
7
|
+
data.tar.gz: ad4c49be046cee22bfb6c4694fa7ddc96f01ab47480261c8fb650f1c76b7c0109c963a9b240518a57b38a86d16a7491a259a014613a3f75823efda9263824866
|
@@ -4,9 +4,21 @@ class Tramway::Auth::Web::SignUpsController < Tramway::Auth::Web::ApplicationCon
|
|
4
4
|
def create
|
5
5
|
@form = "#{model_class}SignUpForm".constantize.new model_class.new
|
6
6
|
if @form.submit params[:record]
|
7
|
-
|
7
|
+
additional_params = { flash: :success }
|
8
|
+
url = if params[:redirect].present?
|
9
|
+
[ params[:redirect], '?', additional_params.to_query].join
|
10
|
+
else
|
11
|
+
Rails.application.routes.url_helpers.root_path(flash: :success)
|
12
|
+
end
|
13
|
+
redirect_to url
|
8
14
|
else
|
9
|
-
|
15
|
+
additional_params = { flash: :error, errors: @form.errors.messages, record: @form.attributes }
|
16
|
+
url = if params[:redirect].present?
|
17
|
+
[ params[:redirect], '?', additional_params.to_query].join
|
18
|
+
else
|
19
|
+
Rails.application.routes.url_helpers.root_path(**additional_params)
|
20
|
+
end
|
21
|
+
redirect_to url
|
10
22
|
end
|
11
23
|
end
|
12
24
|
|
data/lib/tramway/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Rails engine for auth
|
14
14
|
email:
|