Skip to content

OCTO-892: Document the field macro in the README#187

Merged
ColinDKelley merged 2 commits into
masterfrom
OCTO-892/document-field-macro
Jul 1, 2026
Merged

OCTO-892: Document the field macro in the README#187
ColinDKelley merged 2 commits into
masterfrom
OCTO-892/document-field-macro

Conversation

@ColinDKelley

Copy link
Copy Markdown
Contributor

Summary

  • Documents the field DSL macro (the primitive underlying every t.<type> shorthand, timestamps, and optimistic_lock), including its :required/:unique positional flags.
  • Documents the underlying declare_field class method, which can be called outside of a declare_schema do ... end block (e.g. from a shared concern), with an equivalent example for each style.
  • Bumps the gem to 4.0.3 (docs-only release) and updates the CHANGELOG.

Test plan

  • Reviewed rendered README section for accuracy against lib/declare_schema/dsl.rb and lib/declare_schema/model.rb
  • bundle install succeeds and picks up declare_schema (4.0.3)

Jira: OCTO-892

Made with Cursor

ColinDKelley and others added 2 commits July 1, 2026 12:04
Documents the `field` DSL macro (the primitive that every `t.<type>`
shorthand, `timestamps`, and `optimistic_lock` delegate to), its
`:required`/`:unique` positional flags, and the underlying
`declare_field` class method, which can be called outside of a
`declare_schema do ... end` block (e.g. from a shared concern).

Co-authored-by: Cursor <cursoragent@cursor.com>
Docs-only release covering the field/declare_field documentation
added for OCTO-892.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ColinDKelley
ColinDKelley requested a review from a team as a code owner July 1, 2026 19:08
@ColinDKelley
ColinDKelley requested review from Copilot, gmcgilvray, jebentier and ttstarck and removed request for Copilot July 1, 2026 19:08

@gmcgilvray gmcgilvray left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! 👍 though I did not dig through the docs for correctness, but appreciate the tag and pointing out this functionality.

@ColinDKelley

ColinDKelley commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

@gmcgilvray I let Cursor do the digging, so I'm pretty sure the docs are correct. My feedback was just on its wording and structure. I'll merge and release and we can always fine tune if there's more feedback.

(Update: before I can merge I need a 👍 from @ttstarck or @jebentier from the owning team.)

@ColinDKelley
ColinDKelley merged commit 40f47e3 into master Jul 1, 2026
47 checks passed
@ColinDKelley
ColinDKelley deleted the OCTO-892/document-field-macro branch July 1, 2026 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants