app/controllers/swimmers_controller.rb
# Radiography for a specified swimmer id: "Goggle cup" tab rendering.
# Show results which concurrs in current goggle cup score, if any
# For each result, ordered by goggle cup points show google cup point
# and event datas
#
# == Params:
# id: the swimmer id to be processed
#
Radiography for a specified swimmer id: "Goggle cup" tab rendering.
Show results which concurrs in current goggle cup score, if any
For each result, ordered by goggle cup points show google cup point
and event datas

the swimmer id to be processed
Radiography for a specified swimmer id : " Goggle cup " tab rendering . Show results which concurrs in current goggle cup score if any For each result ordered by goggle cup points show google cup point and event datas the swimmer id to be processed
def current_goggle_cup
    @tab_title = @goggle_cups_tab_title
    if @goggle_cups.size == 0 and @swimmer.goggle_cups.size > 0
      @errore = I18n.t('swimmers.no_associated_goggle_cup_found')
      year = @swimmer.goggle_cups.sort_goggle_cup_by_year('DESC').first.season_year
      @swimmer.goggle_cups.each do |goggle_cup|
        @goggle_cups << goggle_cup if ( goggle_cup.season_year == year && !@goggle_cups.include?(goggle_cup) )
      end
      @tab_title = I18n.t('radiography.goggle_cup_closed')
    end
  end
def current_goggle_cup @tab_title = @goggle_cups_tab_title if @goggle_cups . size == 0 and @swimmer . goggle_cups . size > 0 @errore = I18n . t ( 'swimmers.no_associated_goggle_cup_found' ) year = @swimmer . goggle_cups . sort_goggle_cup_by_year ( 'DESC' ) . first . season_year @swimmer . goggle_cups . each do | goggle_cup | @goggle_cups << goggle_cup if ( goggle_cup . season_year == year && ! @goggle_cups . include? ( goggle_cup ) ) end @tab_title = I18n . t ( 'radiography.goggle_cup_closed' ) end end
Radiography for a specified swimmer id: "Goggle cup" tab rendering.
Radiography for a specified swimmer id : " Goggle cup " tab rendering .
# --- "Goggle cup" tab: --- # Verify if present current goggle cup or some closed editions