registration_generator 0.4.0 → 0.5.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d49091967da23472106aae6e58e031dc3213195cebc148dad32aa5ba88412426
|
4
|
+
data.tar.gz: 848fe98cf806153c3baedc90252ea1329e9a35d270340644fc9c266c8bca9735
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9f225fbdb6cb7ef692eeb30dacb8b1fab63c5e9c84117d6363cf90409a48eeeb22bd08c28f93ec324115fb1953f91787ac2ac9dfe860644296e0a442532f997
|
7
|
+
data.tar.gz: 3c842bc0ae5740980357bbf2b0517842bbc4764117769201eb841c44c2fbe604cb74df07da7c425fe4c7e376b1d3567edf1e36dfac3d698d48456f697eb4ad9d
|
@@ -18,7 +18,6 @@ module Registration
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def add_routes
|
21
|
-
route "root \"/\""
|
22
21
|
route "resource :registration, only: [:new, :create]"
|
23
22
|
route "get \"sign_in\", to: \"sessions#new\", as: :sign_in"
|
24
23
|
route "delete \"sign_out\", to: \"sessions#destroy\", as: :sign_out"
|
@@ -27,7 +26,7 @@ module Registration
|
|
27
26
|
def create_helper
|
28
27
|
create_file "app/helpers/authentication_helper.rb", <<~RUBY
|
29
28
|
module AuthenticationHelper
|
30
|
-
def link_to_sign_in_or_out
|
29
|
+
def link_to_sign_in_or_out
|
31
30
|
if authenticated?
|
32
31
|
button_to "Sign Out", sign_out_path, method: :delete
|
33
32
|
else
|
@@ -37,8 +36,7 @@ module Registration
|
|
37
36
|
|
38
37
|
def show_username_if_signed_in
|
39
38
|
if authenticated?
|
40
|
-
|
41
|
-
content.html_safe
|
39
|
+
"Signed in as \#{Current.user.email_address}"
|
42
40
|
end
|
43
41
|
end
|
44
42
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72 %><br>
|
7
7
|
<%%= form.submit "Sign in" %>
|
8
8
|
<%% end %>
|
9
|
-
<
|
10
|
-
|
9
|
+
<p>
|
11
10
|
<%%= link_to "Forgot password?", new_password_path %> |
|
12
|
-
<%%= link_to "Register", new_registration_path %>
|
11
|
+
<%%= link_to "No Account? Register here", new_registration_path %>
|
12
|
+
</p>
|
data/lib/generators/version.rb
CHANGED