Skip to content

Provide error message on duplicate RSVP #1

@luanzeba

Description

@luanzeba

Problem statement

When a given user tries to RSVP to an event they’re already registered for we should display a flash message with the following content:

User has already registered for this event

CleanShot 2022-05-21 at 21 23 01@2x

Steps to reproduce

  1. Start your Rails server with bin/dev command
  2. Create an event at http://localhost:3000/events/new
  3. Create a user at http://localhost:3000/users/new
  4. Click RSVP on the event page twice

How to fix it

I have added unit tests to help guide you in the implementation in the duplicate_rsvp_message development branch.

I'd be happy to review your implementation when I have time. Please open a pull request following these steps:

  1. Follow this guide to setup your forked repo
  2. Checkout a development branch
git fetch upstream
git switch -c duplicate_rsvp_message upstream/duplicate_rsvp_message
  1. Run all tests to see what's failing with bin/rails test
  2. Make your changes to make tests pass
  3. Open a pull request and tag me for review

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions