Move 'Register' link to application menu

This commit is contained in:
cryptogopher 2023-04-06 00:16:13 +02:00
parent 201cb109d8
commit b5c0a6a120
4 changed files with 4 additions and 5 deletions

View File

@ -34,6 +34,7 @@ body {
float: right;
font-size: 0.8em;
font-weight: bold;
margin-left: 1em;
padding: 0.6em;
}
.application-menu a:hover {

View File

@ -16,6 +16,8 @@
data: { turbo_method: :delete } do %>
<%= link_to t(:sign_in), new_user_session_path %>
<% end %>
<%= link_to_unless(user_signed_in?, t(:register), new_user_registration_path) { } %>
</div>
<div class="flashes">

View File

@ -2,10 +2,6 @@
<%= link_to "Log in", new_session_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
<% end %>
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
<% end %>

View File

@ -244,7 +244,7 @@ Devise.setup do |config|
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
config.scoped_views = false
config.scoped_views = true
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).