Hi, I juste found a bug in the plugin paginating_find. I order my records using an associated model column. When i do that, record are beign sorted only based on those displayed on the page, and not based on all of the records found. Is anyone experienced this problem ? does anyone see a solution ? Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Differenthink wrote:> Hi, > > I juste found a bug in the plugin paginating_find. > I order my records using an associated model column. > > When i do that, record are beign sorted only based on those displayed > on the page, and not based on all of the records found. > > Is anyone experienced this problem ? > does anyone see a solution ? > > ThanksHi Differentthink, Will you please post the related code? I had a problem not too long ago with try to sort on a secondary association, and I thought was a bug in associations, but it turned out to be a lack of understand on my part. Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Koebbe wrote:> Hi Differentthink, > > Will you please post the related code? I had a problem not too long ago > with try to sort on a secondary association, and I thought was a bug in > associations, but it turned out to be a lack of understand on my part. > > Peace, > PhillipWhew, you''d think that I never spoke/wrote English before. First, I misspelled your name. Too many tees. Differenthink. Sorry. Second, "try" should be "trying" in the second sentence. Third, "...and I thought _it_ was a bug..." Last (I think), "...lack of understand_ing_ on my part." Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
No problem. here is my piece of code : @question = Question.find(:all, :conditions=>["systeme_id IN (?)", @systeme], :include=> :reponses, :order=>"reponses.date DESC", :page =>{ :size=>10, :current=>params[:page]}) My :order condition works, but only for records shown on the page by pagainting_find... it s why i guess for a bug in the plugin. (when i order by a common column of the record, there is no problem) Any idea ? On 21 juin, 13:59, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Phillip Koebbe wrote: > > Hi Differentthink, > > > Will you please post the related code? I had a problem not too long ago > > with try to sort on a secondary association, and I thought was a bug in > > associations, but it turned out to be a lack of understand on my part. > > > Peace, > > Phillip > > Whew, you''d think that I never spoke/wrote English before. > > First, I misspelled your name. Too many tees. Differenthink. Sorry. > > Second, "try" should be "trying" in the second sentence. > > Third, "...and I thought _it_ was a bug..." > > Last (I think), "...lack of understand_ing_ on my part." > > Peace, > Phillip > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
alexkwolfe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Jun-21 17:57 UTC
Re: Bug in paginating_find
Hi Differentthink. Can you post the sql query that is generated by paginating_find? On Jun 21, 10:38 am, Differenthink <guillaume.mont...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> No problem. > > here is my piece of code : > > @question = Question.find(:all, :conditions=>["systeme_id IN (?)", > @systeme], :include=> :reponses, :order=>"reponses.date DESC", :page > =>{ :size=>10, :current=>params[:page]}) > > My :order condition works, but only for records shown on the page by > pagainting_find... it s why i guess for a bug in the plugin. > (when i order by a common column of the record, there is no problem) > > Any idea ? > > On 21 juin, 13:59, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > Phillip Koebbe wrote: > > > Hi Differentthink, > > > > Will you please post the related code? I had a problem not too long ago > > > with try to sort on a secondary association, and I thought was a bug in > > > associations, but it turned out to be a lack of understand on my part. > > > > Peace, > > > Phillip > > > Whew, you''d think that I never spoke/wrote English before. > > > First, I misspelled your name. Too many tees. Differenthink. Sorry. > > > Second, "try" should be "trying" in the second sentence. > > > Third, "...and I thought _it_ was a bug..." > > > Last (I think), "...lack of understand_ing_ on my part." > > > Peace, > > Phillip > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I ve a big clue ! the problem is not in the plugin, but in my order condition. Let me explain. For each "question", i can have many "reponse". When i use : "reponses.date DESC" i want to order by the last "reponse"... and it seems it use the first one... Any idea to make it understand to order by last "reponse" ? Thanks a lot for everything, On 21 juin, 19:57, "alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Differentthink. Can you post the sql query that is generated by > paginating_find? > > On Jun 21, 10:38 am, Differenthink <guillaume.mont...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > No problem. > > > here is my piece of code : > > > @question = Question.find(:all, :conditions=>["systeme_id IN (?)", > > @systeme], :include=> :reponses, :order=>"reponses.date DESC", :page > > =>{ :size=>10, :current=>params[:page]}) > > > My :order condition works, but only for records shown on the page by > > pagainting_find... it s why i guess for a bug in the plugin. > > (when i order by a common column of the record, there is no problem) > > > Any idea ? > > > On 21 juin, 13:59, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > wrote: > > > > Phillip Koebbe wrote: > > > > Hi Differentthink, > > > > > Will you please post the related code? I had a problem not too long ago > > > > with try to sort on a secondary association, and I thought was a bug in > > > > associations, but it turned out to be a lack of understand on my part. > > > > > Peace, > > > > Phillip > > > > Whew, you''d think that I never spoke/wrote English before. > > > > First, I misspelled your name. Too many tees. Differenthink. Sorry. > > > > Second, "try" should be "trying" in the second sentence. > > > > Third, "...and I thought _it_ was a bug..." > > > > Last (I think), "...lack of understand_ing_ on my part." > > > > Peace, > > > Phillip > > > -- > > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Differenthink wrote:> I ve a big clue ! > > the problem is not in the plugin, but in my order condition. > Let me explain. > > For each "question", i can have many "reponse". > When i use : "reponses.date DESC" i want to order by the last > "reponse"... and it seems it use the first one... > > Any idea to make it understand to order by last "reponse" ? > > Thanks a lot for everything, > > > > > On 21 juin, 19:57, "alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>I''m not sure I completely understand what it is you''re trying to do. I *think* you''re looking for two levels of sorting: question then response. What field on questions is a reasonable candidate for sorting? Name, description, order, id? Suppose you have a field on questions called sort_order, you could do something like :order => ''questions.sort_order asc, responses.date desc'' If that''s not what you''re asking, either write me off as loony or explain it a bit more clearly. Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I want to order by the last "reponse" datetime. which should be : "responses.date desc" but when doing that, it seems that it sorts by the first "reponse" found for a question and note the last "reponse" posted... is it a bit clearer ? (think for it as a forum, where there is one "question" and could be many "answers" (=reponses) On 22 juin, 00:25, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Differenthink wrote: > > I ve a big clue ! > > > the problem is not in the plugin, but in my order condition. > > Let me explain. > > > For each "question", i can have many "reponse". > > When i use : "reponses.date DESC" i want to order by the last > > "reponse"... and it seems it use the first one... > > > Any idea to make it understand to order by last "reponse" ? > > > Thanks a lot for everything, > > > On 21 juin, 19:57, "alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > I''m not sure I completely understand what it is you''re trying to do. I > *think* you''re looking for two levels of sorting: question then > response. What field on questions is a reasonable candidate for > sorting? Name, description, order, id? Suppose you have a field on > questions called sort_order, you could do something like > > :order => ''questions.sort_order asc, responses.date desc'' > > If that''s not what you''re asking, either write me off as loony or > explain it a bit more clearly. > > Peace, > Phillip > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 21 Jun 2008, at 23:33, Differenthink wrote:> > I want to order by the last "reponse" datetime. > which should be : "responses.date desc" > > but when doing that, it seems that it sorts by the first "reponse" > found for a question and note the last "reponse" posted... >so you want to order questions by the max of responses.date for each question ? Fred> is it a bit clearer ? > (think for it as a forum, where there is one "question" and could be > many "answers" (=reponses) > > > On 22 juin, 00:25, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: >> Differenthink wrote: >>> I ve a big clue ! >> >>> the problem is not in the plugin, but in my order condition. >>> Let me explain. >> >>> For each "question", i can have many "reponse". >>> When i use : "reponses.date DESC" i want to order by the last >>> "reponse"... and it seems it use the first one... >> >>> Any idea to make it understand to order by last "reponse" ? >> >>> Thanks a lot for everything, >> >>> On 21 juin, 19:57, "alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <alexkwo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >> I''m not sure I completely understand what it is you''re trying to >> do. I >> *think* you''re looking for two levels of sorting: question then >> response. What field on questions is a reasonable candidate for >> sorting? Name, description, order, id? Suppose you have a field on >> questions called sort_order, you could do something like >> >> :order => ''questions.sort_order asc, responses.date desc'' >> >> If that''s not what you''re asking, either write me off as loony or >> explain it a bit more clearly. >> >> Peace, >> Phillip >> -- >> Posted viahttp://www.ruby-forum.com/. > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Differenthink wrote:> I want to order by the last "reponse" datetime. > which should be : "responses.date desc" > > but when doing that, it seems that it sorts by the first "reponse" > found for a question and note the last "reponse" posted... > > is it a bit clearer ? > (think for it as a forum, where there is one "question" and could be > many "answers" (=reponses) > > > On 22 juin, 00:25, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Are you trying to display a list of questions according to which one has the most recent response? The finder that you posted earlier @question = Question.find(:all, :conditions=>["systeme_id IN (?)", @systeme], :include=> :reponses, :order=>"reponses.date DESC", :page =>{ :size=>10, :current=>params[:page]}) is looking for all questions for the given systeme_ids, and will join to the responses table on each question. So your order clause is going to include all the multiple responses for each question. I''m not sure that''s what you want. If you want to order the questions by the *most recent response* for each question, you will need to create an association such as class ForumPost < ActiveRecord::Base has_one :most_recent_response, :class_name => ''Response'', :foreign_key => ''question_id'', :order => ''date desc'' end Then in the finder, include that association Question.find(:all, :include => :most_recent_response, :order => ''responses.date desc'') Something like that anyway. I''m using some code I wrote earlier this year using ForumPosts as a guide, but in my case, the most recent reply is also a ForumPost, so my association is a little more complicated. But I did something similar. Oh, now that I look more at my code, I see that I constructed custom SQL to do the finding of replies, so this may not work like I think. Give it a try, though, and see what happens. Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, this is exactly what i want to do : "If you want to order the questions by the *most recent response* for each question" I ll give a try to your piece of code thanks On 22 juin, 00:54, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Differenthink wrote: > > I want to order by the last "reponse" datetime. > > which should be : "responses.date desc" > > > but when doing that, it seems that it sorts by the first "reponse" > > found for a question and note the last "reponse" posted... > > > is it a bit clearer ? > > (think for it as a forum, where there is one "question" and could be > > many "answers" (=reponses) > > > On 22 juin, 00:25, Phillip Koebbe <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > Are you trying to display a list of questions according to which one has > the most recent response? The finder that you posted earlier > > @question = Question.find(:all, :conditions=>["systeme_id IN (?)", > @systeme], :include=> :reponses, :order=>"reponses.date DESC", :page > =>{ :size=>10, :current=>params[:page]}) > > is looking for all questions for the given systeme_ids, and will join to > the responses table on each question. So your order clause is going to > include all the multiple responses for each question. I''m not sure > that''s what you want. If you want to order the questions by the *most > recent response* for each question, you will need to create an > association such as > > class ForumPost < ActiveRecord::Base > has_one :most_recent_response, :class_name => ''Response'', :foreign_key > => ''question_id'', :order => ''date desc'' > end > > Then in the finder, include that association > > Question.find(:all, :include => :most_recent_response, :order => > ''responses.date desc'') > > Something like that anyway. I''m using some code I wrote earlier this > year using ForumPosts as a guide, but in my case, the most recent reply > is also a ForumPost, so my association is a little more complicated. But > I did something similar. > > Oh, now that I look more at my code, I see that I constructed custom SQL > to do the finding of replies, so this may not work like I think. Give > it a try, though, and see what happens. > > Peace, > Phillip > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 21 Jun 2008, at 23:54, Phillip Koebbe wrote:> > class ForumPost < ActiveRecord::Base > has_one :most_recent_response, :class_name => > ''Response'', :foreign_key > => ''question_id'', :order => ''date desc'' > end >including has_ones like that doesn''t really work (because of how :include works under the scenes. there''s not a nice way in sql (at least not a portable one) to say join this table but give me only the top row and things like that. One way round it would be to do something like select distinct questions.id from questions inner join responses on question_id = questions.id order by responses.date desc limit x (i''ll leave it up to you to write this in AR speak) this gives you the x question ids with most recent responses. You can then load those questions & responses. Fred> Then in the finder, include that association > > Question.find(:all, :include => :most_recent_response, :order => > ''responses.date desc'') > > Something like that anyway. I''m using some code I wrote earlier this > year using ForumPosts as a guide, but in my case, the most recent > reply > is also a ForumPost, so my association is a little more complicated. > But > I did something similar. > > Oh, now that I look more at my code, I see that I constructed custom > SQL > to do the finding of replies, so this may not work like I think. Give > it a try, though, and see what happens. > > Peace, > Phillip > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hum... Ok so there is no good, nice, proper way to do this... I think of adding a column "date_last_rep" on my ''question" model that i update each time there is an answer.... that way it will be easier to sort it :) On 22 juin, 11:33, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 21 Jun 2008, at 23:54, Phillip Koebbe wrote: > > > > > class ForumPost < ActiveRecord::Base > > has_one :most_recent_response, :class_name => > > ''Response'', :foreign_key > > => ''question_id'', :order => ''date desc'' > > end > > including has_ones like that doesn''t really work (because of > how :include works under the scenes. there''s not a nice way in sql (at > least not a portable one) to say join this table but give me only the > top row and things like that. > One way round it would be to do something like > select distinct questions.id from questions > inner join responses on question_id = questions.id > order by responses.date desc > limit x > (i''ll leave it up to you to write this in AR speak) > > this gives you the x question ids with most recent responses. You can > then load those questions & responses. > > Fred > > > Then in the finder, include that association > > > Question.find(:all, :include => :most_recent_response, :order => > > ''responses.date desc'') > > > Something like that anyway. I''m using some code I wrote earlier this > > year using ForumPosts as a guide, but in my case, the most recent > > reply > > is also a ForumPost, so my association is a little more complicated. > > But > > I did something similar. > > > Oh, now that I look more at my code, I see that I constructed custom > > SQL > > to do the finding of replies, so this may not work like I think. Give > > it a try, though, and see what happens. > > > Peace, > > Phillip > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> including has_ones like that doesn''t really work (because of > how :include works under the scenes. there''s not a nice way in sql (at > least not a portable one) to say join this table but give me only the > top row and things like that.You are, of course, correct again, Fred. That would explain why I created a custom SQL statement to do my searching. Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Differenthink wrote:> Hum... Ok so there is no good, nice, proper way to do this... > > I think of adding a column "date_last_rep" on my ''question" model that > i update each time there is an answer.... > that way it will be easier to sort it :) >I was about to fall asleep last night when I wrote that last post and didn''t look at my code well enough. You must be trying to tackle almost the same problem I did, because I ended up putting a thread_modified_at date on what I call the "thread head". As you plan to do, my thread_updated_at was stamped whenever a descendent post was added or modified. As you can surmise from my statements, my posts are actually threaded, not just a post with many responses. The threading makes it a bit more difficult in that every time a post is saved, I have to traverse the ancestry path backwards to find the head of the thread. But, when paginating through the forum''s thread heads, I don''t have to do a join to sort them in the order of last update, which was the point. Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---