3 ms·
Rails' ActiveRecord is both a query builder and also the canonical Active Record pattern. For example, one can say book = Books.joins(:authors).where(author_
by zrail 7y ago
Rails' ActiveRecord is both a query builder and also the canonical Active Record pattern. For example, one can say
book = Books.joins(:authors).where(author_name: 'James S. A. Corey').first
book.title = "Tiamat's Wrath"
book.save!
It's not that they stopped supporting the Active Record pattern, it's that they rebuilt the whole thing a few years ago with a real relational query builder under the hood.