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
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
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
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
4 matches
Mail list logo