Module Admin::RacesHelper
In: app/helpers/admin/races_helper.rb

Methods

Public Instance methods

BAR category or Rider Rankings category

[Source]

    # File app/helpers/admin/races_helper.rb, line 18
18:   def competition_category_name(race)
19:     if race && race.category
20:       if race.category.parent
21:         return race.category.parent.name
22:       else
23:         return race.category.name
24:       end
25:     end
26:     ""
27:   end

Build links like Cascade Classic: Mt. Bachelor Stage: Senior Men

[Source]

    # File app/helpers/admin/races_helper.rb, line 3
 3:   def link_to_events(race)
 4:     html = ""
 5: 
 6:     race.event.ancestors.reverse.each do |e|
 7:       html << link_to(truncate(e.name, :length => 40), edit_admin_event_path(e), :class => "obvious")
 8:       html << ": "
 9:     end
10: 
11:     html << link_to(truncate(race.event.name, :length => 40), edit_admin_event_path(race.event), :class => "obvious")
12:     html << ": "
13: 
14:     html
15:   end

[Validate]