active_registration 0.1.0 → 0.1.2
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 +4 -4
- data/lib/active_registration/version.rb +1 -1
- data/lib/generators/active_registration/install_generator.rb +1 -1
- data/lib/generators/active_registration/templates/confirmation_mailer.rb +1 -1
- data/lib/generators/active_registration/templates/registrations_controller.rb +4 -1
- data/lib/generators/active_registration/templates/views/confirmation_mailer/confirmation_instructions.html.erb +0 -2
- data/lib/generators/active_registration/templates/views/registrations/new.html.erb +4 -4
- metadata +5 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d91f57419970f798df8aadc2d7fcebf139fdd1f9d215f845389ecc744cbfd0f
|
4
|
+
data.tar.gz: 9c4149954450c9fd6967e9823e3eed6574e7ae2940da157b870db56cf0f450ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9928062ea9157a3f3232ea575b2fd48cd3d4312b216c974e491964a8753ead2cd2b478a82e39ea786e7307330bcb6e46d188a813b12008236b48da333057f10a
|
7
|
+
data.tar.gz: e7bbe018225831ef611ac27bbf42b8536f66dc31d734dee4581af927bac0e17bc46ad89baed73164c380d5ad1e167f2e9e87f627425c6e9105e005726e986d2a
|
@@ -23,7 +23,7 @@ module ActiveRegistration
|
|
23
23
|
# TODO implement edit and update in the future
|
24
24
|
# resource :registration, only: [:new, :create, :edit, :update] do
|
25
25
|
route <<~ROUTE
|
26
|
-
resource :registration, only: [:new, :create] do
|
26
|
+
resource :registration, only: [ :new, :create ] do
|
27
27
|
get :confirm, on: :collection
|
28
28
|
end
|
29
29
|
ROUTE
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class ConfirmationMailer < ApplicationMailer
|
2
2
|
def confirmation_instructions(user)
|
3
3
|
@user = user
|
4
|
-
@confirmation_url =
|
4
|
+
@confirmation_url = confirm_registration_url(token: @user.confirmation_token)
|
5
5
|
mail(to: @user.email_address, subject: "Confirm Your Email")
|
6
6
|
end
|
7
7
|
end
|
@@ -1,4 +1,6 @@
|
|
1
1
|
class RegistrationsController < ApplicationController
|
2
|
+
allow_unauthenticated_access
|
3
|
+
|
2
4
|
def new
|
3
5
|
@user = User.new
|
4
6
|
end
|
@@ -9,7 +11,8 @@ class RegistrationsController < ApplicationController
|
|
9
11
|
ConfirmationMailer.confirmation_instructions(@user).deliver_later
|
10
12
|
redirect_to root_path, notice: "Confirmation email sent!"
|
11
13
|
else
|
12
|
-
|
14
|
+
flash[:alert] = @user.errors.full_messages.join(", ")
|
15
|
+
render :new, status: :unprocessable_entity
|
13
16
|
end
|
14
17
|
end
|
15
18
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= form_with model: @user, url: registration_path do |form| %>
|
2
|
-
<%= form.email_field :email_address
|
3
|
-
<%= form.password_field :password
|
4
|
-
<%= form.password_field :password_confirmation
|
5
|
-
<%= form.submit "Sign Up"
|
2
|
+
<%= form.email_field :email_address, placeholder: "Email Address" %><br>
|
3
|
+
<%= form.password_field :password, placeholder: "Password" %><br>
|
4
|
+
<%= form.password_field :password_confirmation, placeholder: "Confirm Password" %><br>
|
5
|
+
<%= form.submit "Sign Up" %><br>
|
6
6
|
<% end %>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_registration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salanoid
|
@@ -13,9 +13,6 @@ dependencies:
|
|
13
13
|
name: rails
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "~>"
|
17
|
-
- !ruby/object:Gem::Version
|
18
|
-
version: '8.0'
|
19
16
|
- - ">="
|
20
17
|
- !ruby/object:Gem::Version
|
21
18
|
version: 8.0.2
|
@@ -23,14 +20,11 @@ dependencies:
|
|
23
20
|
prerelease: false
|
24
21
|
version_requirements: !ruby/object:Gem::Requirement
|
25
22
|
requirements:
|
26
|
-
- - "~>"
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
version: '8.0'
|
29
23
|
- - ">="
|
30
24
|
- !ruby/object:Gem::Version
|
31
25
|
version: 8.0.2
|
32
|
-
description:
|
33
|
-
confirmation to your rails 8+ application, that uses Rails Authentication Generator
|
26
|
+
description: A drop-in Rails engine that adds secure user registration with email
|
27
|
+
confirmation to your rails 8+ application, that uses Rails Authentication Generator.
|
34
28
|
email:
|
35
29
|
- salanoid@gmail.com
|
36
30
|
executables: []
|
@@ -54,7 +48,6 @@ homepage: https://rubygems.org/gems/active_registration
|
|
54
48
|
licenses:
|
55
49
|
- MIT
|
56
50
|
metadata:
|
57
|
-
allowed_push_host: https://rubygems.org/
|
58
51
|
homepage_uri: https://rubygems.org/gems/active_registration
|
59
52
|
source_code_uri: https://github.com/Salanoid/active_registration
|
60
53
|
changelog_uri: https://github.com/Salanoid/active_registration/blob/main/CHANGELOG.md
|
@@ -65,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
58
|
requirements:
|
66
59
|
- - ">="
|
67
60
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
61
|
+
version: '0'
|
69
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
63
|
requirements:
|
71
64
|
- - ">="
|
72
65
|
- !ruby/object:Gem::Version
|
73
66
|
version: '0'
|
74
67
|
requirements: []
|
75
|
-
rubygems_version: 3.6.
|
68
|
+
rubygems_version: 3.6.9
|
76
69
|
specification_version: 4
|
77
70
|
summary: A simple gem that adds generators for sign up Rails Authentication Generator.
|
78
71
|
test_files: []
|