We're building a party planning application! A Guest has many Events through Invitations. A Event can have many Guests through Invitations. A Invitation belongs to a Event and a Guest.
Implement all of the methods described below
Guest.all
- returns all of the guests
Guest#invitations
- returns an array of
Invitation
instances associated with this instance ofGuest
.
- returns an array of
Guest#events
- returns an array of
Event
instances that theGuest
is planning on going to.
- returns an array of
Guest#indoor_events
- returns an array of
Event
instances that theGuest
is planning on going to that are inside
- returns an array of
A Invitation
object represents that an individual guest has plans to visit a particular event.
Invitation.all
- returns an array of all
Invitation
instances
- returns an array of all
Invitation#guest
- returns the guest associated with this
Invitation
- returns the guest associated with this
Invitation#event
- returns the event associated with this
Invitation
- returns the event associated with this
Event.all
- returns an array of all
Event
- returns an array of all
Event#invitations
- returns an array of all the
Invitation
s to this event
- returns an array of all the
Event#guests
- returns an array of all of the
Guest
s with invitations to visit this event
- returns an array of all of the
Event#invite(guest)
- takes a guest as an argument and invites them to the associated
Event
- takes a guest as an argument and invites them to the associated
Event#all_guests_names
- returns an array of the names of every guest attending this
Event
- returns an array of the names of every guest attending this