-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RW-105: Added redirect for different roles #128
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Krupshark в целом все хорошо, но нужны так же тесты
@@ -1,3 +1,13 @@ | |||
class PagesController < ApplicationController | |||
def welcome; end | |||
def welcome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Теперь нужно будет написать тест на этот метод
private | ||
|
||
def page_for_signed_in(user) | ||
{user.applicant? => vacancies_path, user.company? => resumes_path}[true] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нарушены стили robocop
@@ -7,7 +7,7 @@ nav.navbar.navbar-expand-lg.bg-body-tertiary | |||
#navbarSupportedContent.collapse.navbar-collapse | |||
ul.navbar-nav.me-auto.mb-2.mb-lg-0 | |||
li.nav-item | |||
= link_to "Home", root_path, class: "nav-link fs-4 text-black" | |||
= link_to "Home", home_link, class: "nav-link fs-4 text-black" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ты проверил локально, что будет если user не зашел в аккаунт и нажал на кнопку ?
@@ -5,6 +5,10 @@ def title(page_title) | |||
end | |||
end | |||
|
|||
def home_link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
нужен будет тест на метод
@XaoGao, complite, check PR