RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Random, Previous and Next entries from Active Record models using offset

Finding a random active record entry can be a tricky task and many of the solutions out there come with considerable performance hits. This quick blog post shows a couple of options and how to make use of the offset option, something quite often ignored by rails developers.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in