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, 2010

Stupid Smilies!

It was a good idea to start blogging lessons learned as I code, but it took almost as long to post a correctly formatted entry when I ran into one problem. WordPress creates emoticons automagically. Even if the text is embedded in a <code> or <pre> block. My last posting contained a :order symbol, which [...]

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
[...]