Remove unnecessary links
This commit is contained in:
parent
6b1a678124
commit
d8924336fa
|
@ -1,15 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module UsersHelper
|
module UsersHelper
|
||||||
def display_sign_in_link?
|
|
||||||
controller_name != 'sessions'
|
|
||||||
end
|
|
||||||
|
|
||||||
def display_sign_up_link?
|
|
||||||
devise_mapping.registerable? &&
|
|
||||||
controller_name != 'registrations'
|
|
||||||
end
|
|
||||||
|
|
||||||
def display_password_reset_link?
|
def display_password_reset_link?
|
||||||
devise_mapping.recoverable? &&
|
devise_mapping.recoverable? &&
|
||||||
controller_name != 'passwords' &&
|
controller_name != 'passwords' &&
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
<%- if display_sign_in_link? %>
|
|
||||||
<%= link_to translate('.sign_in'), new_session_path(resource_name) %>
|
|
||||||
<br/>
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%- if display_sign_up_link? %>
|
|
||||||
<%= link_to translate('.sign_up'), new_registration_path(resource_name) %>
|
|
||||||
<br/>
|
|
||||||
<% end -%>
|
|
||||||
|
|
||||||
<%- if display_password_reset_link? %>
|
<%- if display_password_reset_link? %>
|
||||||
<%= link_to translate('.forgot_your_password'), new_password_path(resource_name) %>
|
<%= link_to translate('.forgot_your_password'), new_password_path(resource_name) %>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
Reference in New Issue