Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rails 7.1

Miha Rekar
September 28, 2023

Rails 7.1

Lightning talk I gave at the September 2023 Slovenia Ruby Meetup.

Quick highlights and notable changes that are coming in Rails 7.1 in a couple of weeks.

Miha Rekar

September 28, 2023
Tweet

More Decks by Miha Rekar

Other Decks in Programming

Transcript

  1. Async queries • async_count • async_sum • async_minimum • async_maximum

    • async_average • async_pluck • async_pick • async_ids • async_find_by_sql • async_count_by_sql • Check: config.active_record.async_query_executor
  2. ActiveRecord::Relation#explain • now accepts options • query.explain(“ANALYZE, COSTS, VERBOSE, BUFFERS,

    FORMAT JSON") • query.explain("ANALYZE", "COSTS", "VERBOSE", "BUFFERS", "FORMAT JSON”) • https://explain.dalibo.com/
  3. Composite keys • both at the database and at application

    level • derived from schema • mainly for many-to-many relationships • virtual primary key via query_constraints • composite foreign key on association
  4. BYO Authentication • Devise is ! • User.authenticate_by( email: “[email protected]",

    password: “rails4ever” ) • lazaronixon/authentication-zero • passkeys (WebAuthn)
  5. ActiveSupport::MessagePack • new serializer that integrates with the msgpack gem

    • can reduce payload size and improve performance compared to JSON and Marshal
  6. Support Bun • all-in-one JS/TS runtime & toolkit designed for

    speed, complete with a bundler, test runner, and Node.js-compatible package manager. • I know nothing about this • other people are excited
  7. ICYMI • Ruby 3.3's YJIT is amazing • New register

    allocator • More code now gets JIT compiled • For Shopify: • 13% faster than 3.2 YJIT • 15% faster than 3.3 without YJIT • For Basecamp: • +24% faster on the median, +12% on the average