module Concerns::Competition::Categories

Public Instance Methods

category_ids_for(race) click to toggle source

Array of ids (integers) race category, race category's siblings, and any competition categories

# File app/models/competitions/concerns/competition/categories.rb, line 6
def category_ids_for(race)
  [ race.category_id ] + race.category.descendants.map(&:id)
end