This is the repository for a Rails app similar to Eventbrite. It is a project in Active Record Associations as part of The Odin Project curriculum. Users can register, login, create events, invite other users to events, and rsvp to invitations. Events and invitations can be created, read, updated, or destroyed. Mailers are also setup to send emails in production.
Event and Invitation flow
- Sign-up/Login/Logout/Delete Account.
- Receive email upon signing up, when invited/uninvited to an event, and when an event is canceled.
- Create/Read/Update/Delete Events.
- Create/Read/Update/Delete Invitations.
- Invite one or multiple guests at one time.
- "Attend" or "Leave" Events.
- Limit certain features to logged-in users (RSVPing to events, creating an event, seeing who's been invited to an event, etc.)
-
Install Locally.
- Clone this repo.
- cd into cloned directory
cd private-events
bundle install
-
Seed the database.
rails db:migrate
rails db:seed
-
Start a Rails Server.
rails server
- Navigate to
localhost:3000
in your browser.
-
Play around with the app.
- To get started, click "login" in upper right navbar.
- Login with placeholder credentials (works on Heroku site too!).
- See which events Foo Bar has been invited to.
- OR Signup and receive a welcome email.
- Log back in as Foo Bar.
- Invite the account you just used to sign up
- See who's using the site on the Members page.
- Receive an invitation email.
bundle exec rspec spec/
from theprivate-events
directory.
bundle exec rspec spec/features
bundle exec rspec spec/models
bundle exec rspec spec/requests
- uses
bcrypt
andhas_secure_password
for authentication - Note: I decided not to use Devise for authentication for at least one project. I wanted some experience building my own basic authentication system.
- many to many relationships
has_many, through:
relationships- generate db migrations with proper foreign keys
- use
scope
to limit records returned to a specific constraint - use
includes
method to eager load records where appropriate - use
joins
to join two tables together when necessary
- bcrypt
- bullet
- will_paginate
- guard
- guard-rspec
- shoulda-matchers
- factory_bot_rails
- faker
- simplecov