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

Add unblock button #299

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add unblock button #299

wants to merge 8 commits into from

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.

Copy link
Collaborator

@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
Collaborator

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
Collaborator

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