[Rails] Re: Re: Re: Different Order by clause on will_paginate pages?

2011-10-28 Thread Hussam Ali
And then your index.html.erb would be exactly the same as it currently is, with the pagination and whatnot, and your index (controller) method would also be the same, with no worries about making the pagination smarter. Wherever you wanted your random sample to appear, you would simply use

[Rails] Re: Different Order by clause on will_paginate pages?

2011-10-27 Thread Hussam Ali
Frederick Cheung wrote in post #1028581: On Oct 26, 10:25am, Hussam Ali li...@ruby-forum.com wrote: pagination. Anybody have any idea? That sounds like two mutually contradictory aims. You could perhaps have a single 'random' page and then a series of paginated by created_at pages. If you

[Rails] Re: Re: Different Order by clause on will_paginate pages?

2011-10-27 Thread Hussam Ali
I think you're missing one thing here. This precise construction means that there is a significant chance that some items will never be seen at all. If the first page is random, it's not random within the parameters of what would otherwise land on page 1, it's random across the entire

[Rails] Different Order by clause on will_paginate pages?

2011-10-26 Thread Hussam Ali
Hi im trying to list random records on first page and from 2nd page to onwards, i need to show records by created_at using will_paginate plugin but i can only apply one of these condition at a time. Im showing based on order clause e,g Order('RAND()') or Order('created_at Desc') And then