Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Krupshark
Copy link

@XaoGao, complite, check PR

@XaoGao XaoGao linked an issue Dec 20, 2023 that may be closed by this pull request
Copy link
Owner

@XaoGao XaoGao left a 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
Copy link
Owner

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]
Copy link
Owner

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"
Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нужен будет тест на метод

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redirect welcome page
2 participants