Re: ordering collections not working

2011-03-01 Thread nevinera
Your Category class is the one with the column 'Name', but the categories table isn't used in that query. Would you post the ruby you're using to construct that query? I suspect that you need to put the :order parameter on the other side of that relationship, and it wouldn't hurt to be table-speci

Re: ordering collections not working

2011-02-28 Thread mmmmbeeeeer
Thanks Ben, It's definitely Name with an upper case 'N' ... On Mar 1, 10:56 am, Ben Scofield wrote: > Postgres is case sensitive, so might it be that your column is > actually "name" with a lowercase n? > > On Feb 28, 5:54 pm, ber wrote: > > > > > > > > > Hi I have a strange problem whi

Re: ordering collections not working

2011-02-28 Thread Ben Scofield
Postgres is case sensitive, so might it be that your column is actually "name" with a lowercase n? On Feb 28, 5:54 pm, ber wrote: > Hi I have a strange problem which I'm hoping someone might be able to > shed some light on. > > I have a Rails app with two (relevant) classes: > > class Cat

ordering collections not working

2011-02-28 Thread mmmmbeeeeer
Hi I have a strange problem which I'm hoping someone might be able to shed some light on. I have a Rails app with two (relevant) classes: class Category < ActiveRecord::Base has_many :businesses has_and_belongs_to_many :features, :order => "Name" end and class Feature < ActiveRecord::Base