Rails: order using a has_many/belongs_to relationship?

You need to join the related table to the request result = DogTag. Find(:all, :joins => :dog, :order => 'dog. Name').

You need to join the related table to the request. @result = DogTag. Find(:all, :joins => :dog, :order => 'dog.Name').

Should be DogTag. Find(:all, :joins => :dog, :order => 'dogs. Name') =) – Staelen Oct 7 '09 at 8:00 Thank you for the solution.

I'm sure you know, but for anyone else, I found that the order had to be the table name as well, i.e. I had to pluarlize it: 'dogs. Name' not 'dog.Name' – Evan Oct 7 '09 at 8:00.

Note that dogs is plural in the :order statement. Terms of service. Not the answer you're looking for?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions