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!

Find next / previous Active Record(s) in one query

order_query finds next or previous records relative to the current one efficiently, using techniques popularized by Markus Winand. Version 0.1.3 just came out with several performance improvements. Read more on Github.

Comments

FYI here’s the same feature with https://github.com/charly/nexter. Uses AR inspection instead of order_by. Still quit beta but comments welcome.

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