class OverallBar

See Bar class

Public Instance Methods

create_children() click to toggle source
# File app/models/competitions/overall_bar.rb, line 8
def create_children
  Discipline.find_all_bar.
  reject { |discipline| [Discipline[:age_graded], Discipline[:overall], Discipline[:team]].include?(discipline) }.
  each do |discipline|
    bar = Bar.first(:conditions => { :date => date, :discipline => discipline.name })
    unless bar
      bar = Bar.create!(
        :parent => self,
        :name => "#{year} #{discipline.name} BAR",
        :date => date,
        :discipline => discipline.name
      )
    end
  end
end
default_discipline() click to toggle source
# File app/models/competitions/overall_bar.rb, line 28
def default_discipline
  "Overall"
end
friendly_name() click to toggle source
# File app/models/competitions/overall_bar.rb, line 24
def friendly_name
  'Overall BAR'
end