Sorting a db result set

hola!

#controller code which gets all the db records:
def list2
@teams = Team.find_all
end

#rhtml code
@teams.each do |team|

the question is how do i do a “sort by” “columnX”?

cheers

mizage wrote:

hola!

#controller code which gets all the db records:
def list2
@teams = Team.find_all
end

@teams = Team.find :all, :order => “columnx”

-Brian

def list2
@teams = Team.find :all, :order => ‘columnX’
end

Kent.