$ the-wire · showcase
Rails API docs switch to Markdown by default
By RepoJournal · Filed · About Rails · Composed from the cited sources · methodology
Rails' documentation is now generated with Markdown as the default markup, while two small sentinel removals in CurrentAttributes and define_attribute change what those APIs expose.
Use Markdown as the default API docs markup rails/rails
The API docs generator now passes `--markup=markdown` by default, so gem and framework docs render through the Markdown pipeline unless a file opts back into RDoc with `# :markup: rdoc` (29 files do, because the current renderer does not support code blocks nested in lists). Action Mailer drops its `# :markup: markdown` header and rides the new default; author fxn describes the patch as the cul...
Don't store a sentinel in `CurrentAttributes.defaults` rails/rails
`CurrentAttributes.defaults` no longer carries a `NOT_SET` sentinel for attributes declared without `default:`; those attributes are now simply absent from `.defaults`, and `resolve_defaults` no longer has to filter the sentinel out on every instantiation and reset. Code that read `.defaults` and expected a placeholder entry will now see nothing there.
Don't use a sentinel for an omitted `default:` in `define_attribute` rails/rails
`define_attribute` used to default `default:` to a `NO_DEFAULT_PROVIDED` sentinel and compare against it to detect whether a default was supplied. It now detects omission the same way `ActiveModel::AttributeRegistration#attribute` does, by setting a local in the parameter's default expression, and the sentinel is gone.
Define CollectionProxy bulk insert and upsert methods explicitly rails/rails
`CollectionProxy` generated `insert`, `insert_all`, `insert!`, `insert_all!`, `upsert`, and `upsert_all` via `class_eval` on a string, which Bootsnap cannot cache, so they recompiled on every boot. They are now defined explicitly with a shared private `bulk_write(method)` helper, matching the same change already made to `AssociationRelation`.
Convert Action Mailer README to Markdown rails/rails
The Action Mailer README moves to Markdown. fxn notes RDoc renders fenced code blocks labeled `text` with odd syntax-highlighting colors, though that predates the conversion.