On Oct 20, 5:07 am, "Steven A Bristol" <[EMAIL PROTECTED]> wrote: > On Sun, Oct 19, 2008 at 10:20 PM, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > > > Fixed. > > > diff --git a/app/views/friends/_list.html.erb b/app/views/friends/ > > _list.html.erb > > index 9578948..edb1e9f 100644 > > --- a/app/views/friends/_list.html.erb > > +++ b/app/views/friends/_list.html.erb > > @@ -2,7 +2,7 @@ > > profile ||= @profile > > type ||= 'friends' > > size ||= 20 > > -list = profile.send(type).find(:all, :limit => size, :order => > > 'RAND()') rescue [] > > +list = profile.send(type).find(:all, :limit => size, :order => > > 'RANDOM()') rescue [] > > total = profile.send(type).count > > with_friending ||= false > > > RAND() isn't in postgresql. > > > got it, thanks! > > steven bristol
Is RANDOM() in mysql (and sqlite)? I wasn't sure of the most compatible way to fix it. Anyways, might be nice to get the SQL queries out of the view. Joe --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lovd by Less" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/lovdbyless?hl=en Who loves ya baby? -~----------~----~----~----~------~----~------~--~---
