module ResultsHelper

Public Instance Methods

result_cell(result, column) click to toggle source
# File app/helpers/results_helper.rb, line 40
def result_cell(result, column)
  case column
  when "first_name"
    link_to_results result.first_name, result
  when "last_name"
    link_to_results result.last_name, result
  when "name"
    link_to_results result.name, result
  when "team_name"
    if RacingAssociation.current.unregistered_teams_in_results? || result.team.try(:member?) || result.year < RacingAssociation.current.year
      link_to_team_results result.team_name, result
    end
  else
    result.send ::ResultColumn[column].display_method
  end
end
result_cell_class(column) click to toggle source
# File app/helpers/results_helper.rb, line 34
def result_cell_class(column)
  if ::ResultColumn[column].alignment == :right
    " class=\"right\"".html_safe
  end
end
result_header(column) click to toggle source
# File app/helpers/results_helper.rb, line 30
def result_header(column)
  ::ResultColumn[column].description
end