Class IronmanController
In: app/controllers/ironman_controller.rb
Parent: ApplicationController

Methods

index  

Public Instance methods

[Source]

    # File app/controllers/ironman_controller.rb, line 2
 2:   def index
 3:     @year = params['year'] || Date.today.year.to_s
 4:     date = Date.new(@year.to_i, 1, 1)
 5:     @ironman = Ironman.find(:first, :conditions => ['date = ?', date])
 6:     if @ironman && !@ironman.races.empty?
 7:       @results = Result.paginate( :conditions => ['race_id = ?', @ironman.races.first.id],
 8:                                   :include => [:person],
 9:                                   :order => 'cast(place as signed)',
10:                                   :limit  =>  200,
11:                                   :page =>  params['page']
12:                                 )
13:     end
14:     @years = Ironman.years
15:   end

[Validate]