Ruby on Rails 7.1 introduces Required Template Arguments w/ Default Values, or Strict Locals. This solves the issue of difficult to reason about dependencies & runtime compilations. In this episode, we look at how Strict Locals can improve the overall maintainability of our Rails partials.
In Rails 7.1, we're going to get a new feature that will allow us to generate tokens for attributes. With generates_token_for, a token can embed data from a record. When using the token to fetch the record, the data from the token and the data from the record will be compared.