devise_sms_confirmable 0.1.16 → 0.1.17
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e48132fe8f049a59c4132004cb1058fd482e63e1125a7547ff1d3bb5fe25bea
|
4
|
+
data.tar.gz: 99b5a0f6bc24d7a6c1a4f35001b7e8c6a17663d6ed091a44cfffc9313b054cf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d06f5881545332ed233008e862bafb1af659920b52bcf410cda96ab62aa1f054702a528079221373840a5235e51f4ab3b4e2ab99943838a3d65885a056807f73
|
7
|
+
data.tar.gz: 9d8867071103f6737a5bb907a140d81741429440ca6cdb8400a40f4d36b350a15dfa482b57b5db946dffbc2b2478e5ff0506e12827ccef33b9b3993d066edb34
|
data/Gemfile.lock
CHANGED
@@ -19,16 +19,24 @@ class Devise::SmsConfirmationsController < DeviseController
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
# GET /resource/sms_confirmation?
|
23
|
-
def
|
24
|
-
self.resource = resource_class.
|
22
|
+
# GET /resource/sms_confirmation/edit?phone=abcdef
|
23
|
+
def edit
|
24
|
+
self.resource = resource_class.find_by_phone(confirmation_params[:phone])
|
25
|
+
|
26
|
+
if resource.blank?
|
27
|
+
redirect_to sms_confirmation_path and return
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def update
|
32
|
+
self.resource = resource_class.sms_confirm_by_token(confirmation_params[:sms_confirmation_token])
|
25
33
|
yield resource if block_given?
|
26
34
|
|
27
35
|
if resource.errors.empty?
|
28
|
-
set_flash_message!(:notice, :
|
36
|
+
set_flash_message!(:notice, :sms_confirmed)
|
29
37
|
respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) }
|
30
38
|
else
|
31
|
-
respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :
|
39
|
+
respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :show }
|
32
40
|
end
|
33
41
|
end
|
34
42
|
|
@@ -36,7 +44,7 @@ class Devise::SmsConfirmationsController < DeviseController
|
|
36
44
|
|
37
45
|
# The path used after resending confirmation instructions.
|
38
46
|
def after_resending_confirmation_instructions_path_for(resource_name)
|
39
|
-
is_navigational_format? ?
|
47
|
+
is_navigational_format? ? sms_confirmation_path(resource_name) : '/'
|
40
48
|
end
|
41
49
|
|
42
50
|
# The path used after confirmation.
|
@@ -125,10 +125,6 @@ module Devise
|
|
125
125
|
@skip_sms_reconfirmation_in_callback = true
|
126
126
|
end
|
127
127
|
|
128
|
-
def devise_texter
|
129
|
-
Devise.texter
|
130
|
-
end
|
131
|
-
|
132
128
|
def sms_confirmation_period_valid?
|
133
129
|
return true if self.class.allow_sms_unconfirmed_access_for.nil?
|
134
130
|
return false if self.class.allow_sms_unconfirmed_access_for == 0.days
|
@@ -3,7 +3,7 @@ module ActionDispatch::Routing
|
|
3
3
|
protected
|
4
4
|
|
5
5
|
def devise_sms_confirmation(mapping, controllers)
|
6
|
-
resource :sms_confirmation, only: [:new, :create, :show], path: mapping.path_names[:sms_confirmation], controller: controllers[:sms_confirmations]
|
6
|
+
resource :sms_confirmation, only: [:new, :create, :show, :edit, :update], path: mapping.path_names[:sms_confirmation], controller: controllers[:sms_confirmations]
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_sms_confirmable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uuushiro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|