Skip to content

Decouple Contracts and Forms#4

Merged
bryanrite merged 1 commit intomasterfrom
decouple_contracts_forms
Mar 4, 2026
Merged

Decouple Contracts and Forms#4
bryanrite merged 1 commit intomasterfrom
decouple_contracts_forms

Conversation

@bryanrite
Copy link
Owner

@bryanrite bryanrite commented Mar 4, 2026

This allows Forms to be used outside the Contracts and Operations which allows for easier usage and isolated testing.

Breaking changes though:

  • moved from sync to on_sync as the default form postprocess method name, to align sync with build and validate.
  • state[:contract] is no longer accessible in prepopulate hooks due to execution order. This wasn't intended anyways since the contract should use self. The rest of state is accessible, just not itself.

This allows Forms to be used outside the Contracts and Operations which allows for easier usage and isolated testing.

Breaking change, moved from sync to on_sync as the default form postprocess method name. state[:contract] is no longer accessible in prepopulate or sync hooks, you should be using self anyways.
@bryanrite bryanrite merged commit bb83753 into master Mar 4, 2026
6 checks passed
@bryanrite bryanrite deleted the decouple_contracts_forms branch March 4, 2026 01:23
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.

1 participant