I'm trying to figure out how to create a region that will return random ActiveRecords, and will_paginate also supports.
Currently, each page view gets a completely different random set of ActiveRecords. Thus, each pagination link is actually just another random set of records.
How can I set up a region to be a random order that is saved through pagination?
I guess I need to have some kind of seed based on time?
, ORDER BY RAND() SQL, . , :
ORDER BY RAND()
RAND(), RAND(N)[...] N, , .
RAND(), RAND(N)
[...] N, , .
, (, seed = rand(1e6) - Ruby) . , , MySQL RAND.
seed = rand(1e6)
RAND
, ORDER BY RAND() ( ) . , , (, RAND) , . , : , 11 /, 23. , ( ) ( ), . RAND , , - .