Skip to main content

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​

  1. Search host-app code for explicit history action declarations:

    grep -RInE 'actions[[:space:]]+only:.*history|actions[[:space:]]+only:.*:history' app config lib
  2. 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 declaring has_paper_trail on the model.

  3. If history is not intended for that model, remove :history from its actions only: list. Keep other requested actions unchanged.

  4. 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​

  1. Update the host app’s cm_admin dependency to v9.2.8 using its normal dependency-management process.
  2. Search for explicit :history entries in actions only: declarations.
  3. For each affected model, enable or verify PaperTrail if history is intended, or remove :history if it is not.
  4. Run the host app’s tests and verify History availability for the affected models before deploying.