Main menu:

Site search

Categories

February 2010
S M T W T F S
« Jan    
 123456
78910111213
14151617181920
21222324252627
28  

Archive

View Steven Ng's profile on LinkedIn

Archive for February 1st, 2010

Ordering on a Field in a Linked Table

I attempted to order my runners based on their assigned stage number. The stage number is linked by the stage_id in the schema and the class shows that it belongs to a stage:
class Runner > ActiveRecord::Base
belongs_to :stage
end
At first glance, I figure I would simply order on the stage number:
def self.find_all_runners
[...]