Skip to content

Conversation

juopmu
Copy link
Collaborator

@juopmu juopmu commented Aug 27, 2020

We changed the column/button name from "blacklist" to "block" and added the possibility to unblock coaches. We also created a test.

@simaofreitas : I "fixed" the test by adding a delete button also to the users who are coaches. The test failed because it could find the button.

@juopmu juopmu requested a review from simaofreitas August 27, 2020 19:16
Copy link
Contributor

@simaofreitas simaofreitas left a comment

Choose a reason for hiding this comment

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

LGTM 👏

def block
@user.update_attributes(is_blocked: true)
@coach = Coach.where(user_id: @user.id).first
@coach_applications = CoachApplication.where(coach_id: @coach.id)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make the changes to the coach applications only for future events? Otherwise we will be changing history.

render template: "sessions/new_coach", status: :unauthorized
elsif params["user_type"] == "admin"
render template: "sessions/new_admin", status: :unauthorized
if @user.present? && @user.is_blocked
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice thinking <3

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.

3 participants