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!

Submit a post

You can use basic HTML markup (e.g. <a>) or Markdown.
Note that your post may be edited to suit the format of the site.

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

Post Preview

Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.

  Today

Why Active Record’s Snapshot Semantics Are a Trade-off, Not a Missing Feature

Active Record objects hold the database-derived state they loaded; they do not stay synchronized when another process changes the row. I built four small, reproducible experiments covering stale reads, lost updates, optimistic locking, and association-cache staleness, then looked at Rails’ abandoned Identity Map and what genuinely live objects would require. [more inside]

Ruby Method Arguments: a new book, from your first call to metaprogramming

A new book on Ruby method arguments that follows one thing all the way down: how a Ruby method receives its arguments. From def greet(name) to keyword arguments, splats, blocks, closures, method_missing, instance_eval, and building a small DSL — with the patterns behind Rails and RSpec rebuilt from scratch. Every example was run before it was printed, and the exercises have self-checking solutions in a free companion repo.

Why N+1 Queries Are a Natural Result of Lazy Loading

N+1 is lazy loading repeated across a collection. This RailsRevelry article traces the per-owner association load path, the relation.loaded? versus association(:invoices).loaded? distinction, preload/eager_load/includes, why preloading doesn’t fix count or scoped reads, and strict_loading as enforcement. [more inside]

Loading older posts