1
0
Fork 0

Remove unnecessary links

This commit is contained in:
Alex Kotov 2018-12-03 17:36:49 +05:00
parent 6b1a678124
commit d8924336fa
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
2 changed files with 0 additions and 19 deletions

View File

@ -1,15 +1,6 @@
# frozen_string_literal: true
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?
devise_mapping.recoverable? &&
controller_name != 'passwords' &&

View File

@ -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? %>
<%= link_to translate('.forgot_your_password'), new_password_path(resource_name) %>
<br/>