app/controllers/meeting_reservations_controller.rb
# Redirects to #show if the current meeting has already any results acquired.
# This is used to skip the useless creation of any additional reservation row
# for already acquired/consolidated meetings.
#
Redirects to #show if the current meeting has already any results acquired.
This is used to skip the useless creation of any additional reservation row
for already acquired/consolidated meetings.
Redirects to #show if the current meeting has already any results acquired . This is used to skip the useless creation of any additional reservation row for already acquired / consolidated meetings .
def redirect_to_show_if_meeting_closed
    if ( @meeting.meeting_individual_results.exists? || @meeting.are_results_acquired? )
      flash[:error] = I18n.t('meeting.errors.meeting_already_closed')
      redirect_to( meeting_reservations_show_path( id: @meeting.id ) ) and return
    end
  end
def redirect_to_show_if_meeting_closed if ( @meeting . meeting_individual_results . exists? || @meeting . are_results_acquired? ) flash [ :error ] = I18n . t ( 'meeting.errors.meeting_already_closed' ) redirect_to ( meeting_reservations_show_path ( id : @meeting . id ) ) and return end end
Redirects to #show if the current meeting has already any results acquired.
Redirects to #show if the current meeting has already any results acquired .
# Avoid creating useless new reservations for already closed meetings, # by redirecting to #show: