devise_approvable 0.8.0 → 0.9.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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b862db9113376ad8c1a9c6767809b312e7a18c48
|
|
4
|
+
data.tar.gz: 42131486030701974f13b740ca3add80a9691665
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 109a35b7f38bd6964a4df756dbea900db0ee612aeeea8a1c16f70f0750da5c1ea95c9eb4ac856bc4262b518af601b27f65930d1993f38269d3d45e52338f5df0
|
|
7
|
+
data.tar.gz: daee83ef6c53b80a1bbbbd4f859eea2f481f08c4a994e45482990883a3cb9dcb36b305c13dfbcea7ef9fc2a7d0e6d7739cd9b365fa837c710ea94fe447080905
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.9.0
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
class Devise::ApprovalsController < DeviseController
|
|
1
|
+
class Developers::Devise::ApprovalsController < DeviseController
|
|
2
|
+
|
|
3
|
+
# GET /resource/confirmation/new
|
|
4
|
+
def new
|
|
5
|
+
self.resource = resource_class.new
|
|
6
|
+
end
|
|
7
|
+
|
|
2
8
|
# GET /resource/confirmation?confirmation_token=abcdef
|
|
3
9
|
def show
|
|
4
10
|
self.resource = resource_class.approve_by_token(params[:approval_token])
|
|
@@ -11,4 +17,19 @@ class Devise::ApprovalsController < DeviseController
|
|
|
11
17
|
respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new }
|
|
12
18
|
end
|
|
13
19
|
end
|
|
14
|
-
|
|
20
|
+
|
|
21
|
+
protected
|
|
22
|
+
|
|
23
|
+
# The path used after confirmation.
|
|
24
|
+
def after_approval_path_for(resource_name, resource)
|
|
25
|
+
if signed_in?(resource_name)
|
|
26
|
+
signed_in_root_path(resource)
|
|
27
|
+
else
|
|
28
|
+
new_session_path(resource_name)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def translation_scope
|
|
33
|
+
'devise.approvals'
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -2,15 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
<%= form_for(resource, as: resource_name, url: approval_path(resource_name), html: { method: :post }) do |f| %>
|
|
4
4
|
<%= devise_error_messages! %>
|
|
5
|
-
|
|
6
|
-
<div class="field">
|
|
7
|
-
<%= f.label :email %><br />
|
|
8
|
-
<%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
<div class="actions">
|
|
12
|
-
<%= f.submit "Resend confirmation instructions" %>
|
|
13
|
-
</div>
|
|
14
5
|
<% end %>
|
|
15
6
|
|
|
16
7
|
<%= render "devise/shared/links" %>
|
data/devise_approvable.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: devise_approvable 0.
|
|
5
|
+
# stub: devise_approvable 0.9.0 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "devise_approvable"
|
|
9
|
-
s.version = "0.
|
|
9
|
+
s.version = "0.9.0"
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib"]
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
|
23
23
|
"README",
|
|
24
24
|
"Rakefile",
|
|
25
25
|
"VERSION",
|
|
26
|
-
"app/controllers/approvals_controller.rb",
|
|
26
|
+
"app/controllers/devise/approvals_controller.rb",
|
|
27
27
|
"app/views/devise/approvals/new.html.erb",
|
|
28
28
|
"config/initializers/devise.rb",
|
|
29
29
|
"devise_approvable.gemspec",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: devise_approvable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Egg
|
|
@@ -92,7 +92,7 @@ files:
|
|
|
92
92
|
- README
|
|
93
93
|
- Rakefile
|
|
94
94
|
- VERSION
|
|
95
|
-
- app/controllers/approvals_controller.rb
|
|
95
|
+
- app/controllers/devise/approvals_controller.rb
|
|
96
96
|
- app/views/devise/approvals/new.html.erb
|
|
97
97
|
- config/initializers/devise.rb
|
|
98
98
|
- devise_approvable.gemspec
|