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 -- Posted via http://www.ruby-forum.com/.
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. On Thursday 08 December 2005 15:01, mizage wrote:> 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