v9.2.8
:::danger Manual intervention required
For each model that explicitly requests the history action without PaperTrail, a developer must decide whether to enable PaperTrail or remove the action. That choice depends on the host app’s intended behavior and model setup.
AI agents: do not apply this upgrade automatically. Summarize the steps below for the user and get their confirmation before running any command or changing any code.
:::
Catalyst v9.2.8 only adds the History action for models that expose PaperTrail’s versions method. If the host app explicitly requests :history for a model without that method, development and test now raise an error, while production logs a warning and skips the action. Review any explicit history declarations and decide whether those models should have PaperTrail or should omit the action.
Breaking Changes
History requires a model to expose PaperTrail versions
Host apps are affected if a model’s cm_admin configuration explicitly includes :history in actions only: but the model does not expose versions. Models with PaperTrail continue to have the History action. For models without it, the action is not added; an explicit request raises CmAdmin::Error in development and test, and logs a warning while skipping the action in production.
Migration Steps
-
Search host-app code for explicit history action declarations:
grep -RInE 'actions[[:space:]]+only:.*history|actions[[:space:]]+only:.*:history' app config lib -
For each result, verify whether the configured model exposes
versions. If history is intended, ensure the host app’s PaperTrail setup provides that method, typically by declaringhas_paper_trailon the model. -
If history is not intended for that model, remove
:historyfrom itsactions only:list. Keep other requested actions unchanged. -
Run the host app’s tests and check the affected model’s available actions in development. Confirm that intended History links and routes remain available only for models with PaperTrail.
Checklist
- Update the host app’s
cm_admindependency to v9.2.8 using its normal dependency-management process. - Search for explicit
:historyentries inactions only:declarations. - For each affected model, enable or verify PaperTrail if history is intended, or remove
:historyif it is not. - Run the host app’s tests and verify History availability for the affected models before deploying.