app/controllers/meeting_reservations_controller.rb
# Collects the list of @meeting_reservations for each Swimmer, given the specified
# meeting and team_affiliation.
#
# === Params:
# - meeting: a valid instance of Meeting
# - team_affiliation: a valid instance of TeamAffiliation (capable of attending the Meeting)
#
# === Prepares:
# - @meeting_reservations: ActiveRelation object (list of reservations for each Swimmer of the Team)
#
Collects the list of @meeting_reservations for each Swimmer, given the specified
meeting and team_affiliation.

a valid instance of Meeting
team_affiliation: a valid instance of TeamAffiliation (capable of attending the Meeting)

@meeting_reservations: ActiveRelation object (list of reservations for each Swimmer of the Team)
Collects the list of @meeting_reservations for each Swimmer given the specified meeting and team_affiliation . a valid instance of Meeting team_affiliation : a valid instance of TeamAffiliation ( capable of attending the Meeting ) @meeting_reservations : ActiveRelation object ( list of reservations for each Swimmer of the Team )
def prepare_meeting_reservations( meeting, team_affiliation )
    @meeting_reservations = MeetingReservation.where(
      meeting_id: meeting.id,
      team_id: team_affiliation.team_id
    ).joins(:swimmer).includes(:swimmer).order('swimmers.complete_name')
  end
def prepare_meeting_reservations ( meeting , team_affiliation ) @meeting_reservations = MeetingReservation . where ( meeting_id : meeting . id , team_id : team_affiliation . team_id ) . joins ( :swimmer ) . includes ( :swimmer ) . order ( 'swimmers.complete_name' ) end
Collects the list of @meeting_reservations for each Swimmer, given the specified
meeting and team_affiliation.
Collects the list of @meeting_reservations for each Swimmer given the specified meeting and team_affiliation .
meeting
<not_specific>
team_affiliation
<not_specific>