Skip to main content

v10.0.0

:::danger Manual intervention required

CM Admin is renamed to Catalyst. Host code moves to the new names in one step, run by rails catalyst:upgrade, and the engine's database tables are renamed by a migration. Review the codemod's output and the items it lists before committing, and deploy the table rename deliberately.

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. After confirmation, follow AI-assisted upgrade and the residual CM sweep: the codemod alone does not catch every CM Admin reference.

:::

danger

The gem server has moved

The private gem server is now https://gems.betterplatforms.dev; https://cm-gems.commutatus.com is no longer used. Point the Gemfile source at the new host and rename the Bundler credential env var from BUNDLE_CM___GEMS__COMMUTATUS__COM to BUNDLE_GEMS__BETTERPLATFORMS__DEV in every environment and CI workflow. Catalyst still reads the old env var as the Bridge project key, but Bundler only uses the new one for the new host.

Catalyst v10.0.0 renames the gem, the Ruby module, the engine's models, the admin DSL, folders, rake tasks, generators and spec helpers from CM Admin names to Catalyst names, and cm_/cm- names to ct_/ct-. The engine's tables move from cm_* to ct_*. There are no aliases for the old names in host code: the catalyst:upgrade codemod rewrites the app instead. Compatibility is kept where data or external systems cross the release boundary: the engine mount path stays /cm_admin, old class names stored in the database, queued jobs and GlobalIDs can still be read, database translations fall back to cm_admin.*, and PostgreSQL compatibility views preserve the old engine table names during a rolling deploy.

The release also replaces the JavaScript libraries behind selects and date pickers with Catalyst's own components, removes the collection option from filters and adds support for namespaced models. The codemod does not make those changes β€” they are listed under Breaking Changes and must be changed by hand.

Upgrade from the latest 9.x release. The steps below assume PostgreSQL and a git repository with no uncommitted changes.

AI-assisted upgrade and the residual CM sweep​

If you are an AI agent reading this page from a URL, treat this section as required instructions. If you are a person using an AI agent, make sure the agent follows it. In short: codemod first, full-repository sweep second, no blind find-and-replace.

Run catalyst:upgrade first. It understands Ruby constant scope, file moves, the admin DSL and ambiguous associations better than a text replacement. It is not exhaustive: it rewrites content in .rb, .rake, .jbuilder, .slim, .erb, .haml, .js, .css, .scss, .yml and .yaml files in app/, config/, lib/, spec/, test/, db/seeds.rb and db/seeds/, and it only reports selected problems in files such as the Gemfile, Procfiles, Dockerfiles, setup scripts and CI workflows. Review everything outside that coverage β€” TypeScript/TSX, JSX, shell scripts, SQL files, Docker and deploy configuration, package scripts, documentation and files in other directories β€” after the codemod.

"CM to CT" is shorthand for this rename, not a mechanical replacement of the letters cm. CmAdmin/cm_admin usually becomes Catalyst/catalyst, engine classes become namespaced Catalyst::* constants, and Catalyst-owned cm_/cm- names usually become ct_/ct-. Use the rules below for every match.

Instructions for AI agents​

After the user confirms the upgrade:

  1. Read this whole guide before editing. Upgrade the gem and run the codemod before manual rewrites. Do not run a repository-wide find-and-replace.

  2. Apply the codemod and resolve its Change by hand output. Treat that output as incomplete.

  3. Search the entire repository for old names. Include hidden configuration files; exclude only dependency, build, cache and VCS directories. With ripgrep, for example:

    rg -n --hidden --no-ignore \
    --glob '!.git/**' --glob '!node_modules/**' --glob '!vendor/bundle/**' \
    --glob '!tmp/**' --glob '!log/**' --glob '!coverage/**' --glob '!dist/**' --glob '!build/**' \
    --glob '!app/assets/builds/**' --glob '!public/assets/**' --glob '!public/packs/**' \
    -e '(?i)cm[-_ ]?admin' \
    -e '\bCm[A-Z]' -e '\bcm[A-Z]' -e '\bCM[A-Z]' \
    -e '\bCM[_-][A-Za-z0-9_-]+' \
    -e '\bcm_[A-Za-z0-9_]+' -e '\bcm-[A-Za-z0-9-]+' \
    -e '\b(ApiToken|OtpRequest|RubyLlmUsage|Translation)\b' \
    -e '\bCt[A-Z]'
  4. Search file and directory names as well as file contents. Rename host files and directories that use old CM Admin names; do not rename historical migrations or generated artifacts.

  5. Open every match and classify it with the tables below. Update Catalyst-related references in Ruby, JavaScript/TypeScript, CSS/SCSS, templates, YAML, rake tasks, shell scripts, CI/deploy configuration, Docker files, specs and seeds. Check neighboring code, because one match often means a nearby class name, data attribute or path needs the same treatment.

  6. Rerun the content and filename searches after editing. Do not finish while any match is unclassified: either update it, verify it is an intentional exception below, or ask the user.

Common misses by file type​

  • Ruby and Rake: CmAdmin, engine constants such as CmRole, associations such as cm_role, cm_admin:* tasks, cm_admin_models, spec helpers, raw SQL naming cm_* tables, moved engine-model overrides such as app/models/catalyst/api_token.rb, and host OTP copies or references such as app/models/otp_request.rb, app/models/catalyst/otp_request.rb and bare OtpRequest.
  • JavaScript and TypeScript: window.CmAdmin, cmAdminConfig, the cm-admin:view-changed event, camel-case cm* identifiers and hard-coded engine-model URLs such as /cm_admin/cm_roles (keep /cm_admin; change cm_roles to ct_roles).
  • CSS, SCSS and templates: .cm-admin, .cm-admin-static, other .cm-* classes, --cm-* custom properties and data-cm-* attributes.
  • YAML, CI, shell, Docker and package scripts: the cm-admin gem name, cm_admin:* tasks, old generator names, deploy commands and SQL scripts.

Rename rules for the residual sweep​

Kind of matchCorrect v10 formExamples
CM Admin product, module, folder, rake, generator or locale-root referencesCatalyst/catalystCmAdmin β†’ Catalyst; cm_admin:verify β†’ catalyst:verify; app/views/cm_admin/ β†’ app/views/catalyst/; the cm_admin: locale root β†’ catalyst:
Engine model and constant namesNamespaced Catalyst::* constantCmRole β†’ Catalyst::Role; CtFileExport β†’ Catalyst::FileExport; SendCmAdminEmailJob β†’ Catalyst::SendEmailJob
Cm/cm inside a host app's camel-case identifierCt/ctMyCmRole β†’ MyCtRole; cmRoleId β†’ ctRoleId
Catalyst-owned snake_case namescm_ β†’ ct_, unless it is a cm_admin framework name or an admin DSL methodcm_role β†’ ct_role; cm_index_user_path β†’ ct_index_user_path; cm_admin_models β†’ catalyst_models
Admin DSL methodsDrop the cm_ prefixcm_index β†’ index; cm_show_section β†’ show_section
Kebab-case CSS, data and event namescm- β†’ ct-; cm-admin β†’ catalystdata-cm-id β†’ data-ct-id; .cm-admin-static β†’ .catalyst-static; cm-admin:view-changed β†’ catalyst:view-changed
Engine table and column namesThe exact database renamecm_roles β†’ ct_roles; cm_role_id β†’ ct_role_id; cm_admin_installation_id β†’ catalyst_installation_id

Use the mapping tables in Breaking Changes for exact class, helper and file names. A Ct* match is not automatically correct: transitional constants such as CtFileExport still belong to the old API and must become namespaced Catalyst::* constants, while a host app's own MyCtRole name can be valid.

Intentional leftovers​

Do not rewrite these merely because the sweep finds them:

MatchWhy it stays
The /cm_admin engine mount path, including mount Catalyst::Engine => "/cm_admin"The mount path intentionally stays unchanged. Engine-model URL segments still change, as in /cm_admin/cm_roles β†’ /cm_admin/ct_roles.
db/schema.rb or db/structure.sqlThese files are generated. Update them by running the migration, never by search-and-replace.
Historical files under db/migrate/Old migrations are a historical record. Do not edit them just to remove old names.
Changelogs, release notes and upgrade documentation that describe the old releaseThey are historical references. Documentation that describes the current app should still be updated.
Stored data used for compatibility: cm_admin.* translation rows, the cm_admin: Bridge credentials key, queued jobs, GlobalIDs and serialized class namesCatalyst reads these old values for compatibility. Do not rewrite stored data with a text replacement; use the migration and backfill tasks described below. Prefer catalyst: when editing credentials, but ask before changing deployed secrets.
cm names unrelated to CM AdminExamples include centimetres, business abbreviations and third-party API names.

For a human reviewer, use the same search output as a checklist. The goal is not zero occurrences of the letters cm; it is zero unintended references to CM Admin APIs in code that runs or configures the upgraded app.

Breaking Changes​

The gem and the Ruby module are renamed​

BeforeAfter
gem "cm-admin"gem "better-platforms-catalyst", from the private gem server
CmAdmin, CmAdmin::EngineCatalyst, Catalyst::Engine
CmRole, CmPermission, CtFileExportCatalyst::Role, Catalyst::Permission, Catalyst::FileExport
ApiToken, OtpRequest, TranslationCatalyst::ApiToken, Catalyst::OtpRequest, Catalyst::Translation
CmAdmin::BlogPost (admin concern)Catalyst::Admin::BlogPost
config/initializers/cm_admin.rbconfig/initializers/catalyst.rb

Every engine model moves into the Catalyst namespace, so a host app can have its own ApiToken or Translation model.

Migration Steps​

  1. Switch the Gemfile entry:

    source "https://gems.betterplatforms.dev" do
    gem "better-platforms-catalyst", "~> 10.0"
    end
  2. Run bundle install.

Host overrides of engine models need review​

The codemod preserves host overrides of engine models: a file such as app/models/api_token.rb moves to app/models/catalyst/api_token.rb and gets an explicit self.table_name. This is deliberate β€” the override may carry app-specific behavior β€” but it also means the host file shadows the gem implementation. Review every moved engine-model file instead of assuming either that it must stay or that it must be deleted.

  • If the file is an unmodified or stale copy of the old engine model, delete it so the gem's Catalyst::* implementation is used.
  • If it has app-specific behavior, compare it with the gem's current implementation and port only that customization. Prefer reopening the gem class in an initializer for small additions; keeping a whole-model override means the app no longer receives upstream fixes in that file automatically.
  • Do not delete the underlying tables or data. For example, removing a stale app/models/catalyst/api_token.rb only removes the Ruby override; the api_tokens table and its rows stay.

Pay particular attention to Catalyst::ApiToken: stale copies can miss the gem's token generation, expiry and verify! behavior. Do not delete an ApiToken override blindly when it contains intentional app behavior, but do not leave it unchanged merely because the codemod moved it. Catalyst::OtpRequest is stricter: v10 expects the gem implementation to run, so remove host copies as described in the authentication section and port additions onto the gem class.

The admin DSL, folders and rake tasks are renamed​

BeforeAfter
cm_admin do … cm_index, cm_show, cm_sectioncatalyst do … index, show, section
app/controllers/cm_admin/, app/views/cm_admin/, …app/controllers/catalyst/, app/views/catalyst/, …
layout "cm_admin", render "cm_admin/custom"layout "catalyst", render "catalyst/custom"
cm_admin.cm_index_user_path (the route proxy)catalyst.ct_index_user_path
cm_admin: in host locale files, t("cm_admin.title")catalyst:, t("catalyst.title")
rails cm_admin:install_migrations, cm_admin:verify, cm_admin:scss:buildrails catalyst:install_migrations, catalyst:verify, catalyst:scss:build
rails generate cm_admin:…rails generate catalyst:…
window.CmAdmin in JavaScriptwindow.Catalyst
window.cmAdminConfig, the cm-admin:view-changed eventwindow.catalystConfig, catalyst:view-changed
.cm-admin, .cm-admin-static and other cm- CSS/data names.catalyst, .catalyst-static and ct-/ct_ equivalents
stylesheet_link_tag "cm_admin/cm_admin"stylesheet_link_tag "catalyst/application"
devise :cm_admin_authenticatable, Devise::Strategies::CmAdminAuthenticatabledevise :catalyst_authenticatable, Devise::Strategies::CatalystAuthenticatable
SendCmAdminEmailJobCatalyst::SendEmailJob
Contracts::CmApi::CmComments::CreateContractCatalyst::Api::Comments::CreateContract
Blueprints::CmApi::CmCommentBlueprint, Blueprints::CmApi::CmSupportTicketBlueprintCatalyst::Api::CommentBlueprint, Catalyst::Api::SupportTicketBlueprint
CmApi::CmSupportTicketsController, CmApi::CmSupportTickets::*Catalyst::Api::SupportTicketsController, Catalyst::Api::SupportTickets::*
config.cm_admin_modelsconfig.catalyst_models
Catalyst::Mailer#cm_admin_mailCatalyst::Mailer#send_email
cm_recognize_path helpercatalyst_recognize_path

All the DSL methods drop their cm_ prefix: cm_index, cm_show, cm_new, cm_edit, cm_destroy, cm_dashboard, cm_section and cm_show_section.

Migration Steps​

  1. Preview the changes. Nothing is written:

    bin/rails catalyst:upgrade
    DIFF=1 bin/rails catalyst:upgrade # also prints a diff for each file
  2. Apply them:

    APPLY=1 bin/rails catalyst:upgrade

    The codemod refuses to run with uncommitted changes, so the result can be reviewed with git diff and undone with git checkout.

  3. Work through the Change by hand list it prints. Each item names a file and line:

    • cm_admin: rake tasks run from CI, scripts, Procfiles or deploy hooks: rename them to catalyst:.
    • Remaining CmAdmin references, for example in JavaScript (window.CmAdmin).
    • Files that define OtpRequest, Translation, ApiToken or RubyLlmUsage inside another module: the codemod leaves their bare references alone, because they could mean either class.
    • Associations named after an engine model whose options continue on the next line: add the class_name: it suggests.
    • Bare strings that are exactly an old table name ("cm_roles"): check whether each is a table name or something else.
  4. Perform the residual CM sweep across the whole repository. The Change by hand list does not include files or syntax outside the codemod's coverage.

  5. Run the test suite, then commit.

Spec helpers are renamed​

The codemod renames these in spec/ and test/:

BeforeAfter
require "cm_admin/testing/rspec"require "catalyst/testing/rspec"
cm_admin_sign_in, cm_admin_index, cm_admin_run, …catalyst_sign_in, catalyst_index, catalyst_run, …
def cm_admin_user, def cm_admin_record_fordef catalyst_user, def catalyst_record_for
it_behaves_like "cm_admin pages render"it_behaves_like "catalyst pages render"
cm_admin_errors: :allowcatalyst_errors: :allow
"action.cm_admin" notification"action.catalyst"

Matcher names (succeed, list_records, be_allowed_to, …) don't change.

Migration Steps​

  1. Nothing beyond running the codemod and the residual CM sweep. If the app's own spec helpers wrap these methods outside spec/ or test/, the sweep should catch those calls.

Host copies of the authentication layer are removed; use_catalyst_otp is gone​

The gem now provides the whole authentication layer, registered by the engine itself for every auth method other than :custom:

  • the catalyst_authenticatable Devise strategy and model module (lib/devise/)
  • Users::SessionsController and Users::PasswordsController, complete with the OTP flow, password reset and password update actions
  • the Catalyst::OtpSessions controller concern behind them
  • the Catalyst::OtpRequest model, including the generate! / verify? class methods the flow now runs on
  • the Catalyst::Auth::* services (AuthenticateOtp, RequestOtp, AuthenticatePassword, RequestPasswordReset, ChangePassword, ResetPassword, ValidatePasswordResetToken)

The OtpAuthenticatable user concern is removed. Its instance methods (create_otp_request, verify_otp?, verify_otp_with_email?) and class method (create_otp_request_for_email) are superseded by Catalyst::OtpRequest.generate! and Catalyst::OtpRequest.verify?, which the whole sign-in flow now uses. An include OtpAuthenticatable line left in a user model raises NameError on boot.

The opt-in flag is gone β€” an initializer that still sets config.use_catalyst_otp fails to boot with undefined method β€” and the codemod deletes the Devise copies host apps carried and removes their registrations:

  • lib/devise/strategies/cm_admin_authenticatable.rb and lib/devise/models/cm_admin_authenticatable.rb (also catalyst_authenticatable copies)
  • Devise.add_module, Warden::Strategies.add and Devise::Models.autoload statements for those modules, and require lines that load the copies
  • include OtpAuthenticatable statements, wherever they appear (an include mixing it with other modules is left for a person)

The user model keeps devise …, :catalyst_authenticatable β€” the module is what puts the strategy in the user scope's warden chain.

Everything else the host app copied must be removed by hand, as described below. Because the host app's app/ paths take precedence over the engine's, any of these files that remain shadow the gem's implementation β€” the app keeps running stale code while appearing upgraded.

Migration Steps​

  1. Remove config.use_catalyst_otp = true from config/initializers/catalyst.rb.

  2. Keep the otp_requests table, but update it for Catalyst::OtpRequest. Do not drop or recreate the table; the gem's model uses the same table and existing rows can stay. It reads email when delivering and uses delivery_channel to choose the delivery method. On a table without email the delivery error is rescued and logged, so OTPs silently never arrive. Add a migration:

    class UpdateOtpRequestsForCatalyst < ActiveRecord::Migration[8.0]
    def change
    enable_extension "citext" unless extension_enabled?("citext")
    add_column :otp_requests, :email, :citext unless column_exists?(:otp_requests, :email)
    add_index :otp_requests, :email unless index_exists?(:otp_requests, :email)
    add_column :otp_requests, :delivery_channel, :integer unless column_exists?(:otp_requests, :delivery_channel)
    change_column_null :otp_requests, :user_id, true
    end
    end

    user_id becomes nullable so OTPs can be generated for email addresses with no user record (invitations and similar flows). Existing rows are unaffected; delivery_channel can stay null on rows created before the column existed.

  3. Slim the user model's auth concern (usually app/models/concerns/auth/user.rb). The codemod removes include OtpAuthenticatable lines itself, since the concern is removed in v10. Delete these methods wherever they are defined:

    • create_otp_request (any signature)
    • verify_otp?
    • verify_otp_with_email?
    • create_otp_request_for_email / self.create_otp_request_for_email

    The association is the only OTP addition the user model still needs, and it must point at the gem model:

    has_many :otp_requests, dependent: :destroy, class_name: "Catalyst::OtpRequest"

    Everything else stays: the devise …, :catalyst_authenticatable declaration, can_access_admin_panel?, and host-specific password logic (assign_random_password, complexity validations, …) are not provided by the gem and must be kept.

    Host code that generates or verifies OTPs outside the gem's sign-in flow must move to the class methods the gem flow uses:

    Removed callerReplacement
    user.create_otp_request(delivery_channel:)Catalyst::OtpRequest.generate!(user:, delivery_channel:)
    user.verify_otp?(otp)Catalyst::OtpRequest.verify?(user:, otp:)
    user.verify_otp_with_email?(email, otp)Catalyst::OtpRequest.verify?(email:, otp:)
    User.create_otp_request_for_email(email)Catalyst::OtpRequest.generate!(email:, delivery_channel: :email)
    otp_request = Catalyst::OtpRequest.generate!(user:, delivery_channel: :email)
    verified = Catalyst::OtpRequest.verify?(user:, otp:)

    For an email-only flow such as invitations, pass email: instead of user::

    otp_request = Catalyst::OtpRequest.generate!(email:, delivery_channel: :email)
    verified = Catalyst::OtpRequest.verify?(email:, otp:)

    Two behavioral differences to check in callers: generate! raises ActiveRecord::RecordInvalid when the resend limit is hit, where create_otp_request returned an invalid record β€” rescue it the way Catalyst::Auth::RequestOtp does. And the previous_otp_status argument is gone: generating a new OTP always cancels the previous active requests.

  4. Delete the sessions controller copy at app/controllers/users/sessions_controller.rb if its actions (validate_email, validate_credentials, validate_otp, validate_password, resend_otp, sign_in_with_credentials, reset_password_email, send_reset_password_email, update_password) duplicate the gem's. No route changes are needed β€” devise_for :users, controllers: { sessions: "users/sessions" } resolves to the gem's controller once the host file is gone, and the custom action routes (validate_email, sign_in_with_credentials, …) stay as they are.

    If the controller has custom behavior, keep a slim copy β€” but know that defining the constant shadows the gem's controller entirely, so it must re-establish everything it still needs:

    module Users
    class SessionsController < Devise::SessionsController
    layout "ct_session"
    helper Catalyst::ViewHelpers

    include Catalyst::OtpSessions

    # copy the gem's reset_password_email / send_reset_password_email / update_password
    # actions if the app uses them, then add your overrides here
    end
    end

    The gem controller's source is the reference (app/controllers/users/sessions_controller.rb in the gem); after_successful_sign_in and after_sign_in_redirect_path are the intended extension points for post-login behavior.

  5. Delete the passwords controller copy at app/controllers/users/passwords_controller.rb on the same terms β€” the gem's controller covers token validation, edit and update.

  6. Delete host OTP model copies and their concern; use Catalyst::OtpRequest. Look for each of these and delete them:

    • app/models/catalyst/otp_request.rb β€” the codemod also moves a top-level app/models/otp_request.rb here, so check even if the app never had this path before
    • app/models/cm_admin/otp_request.rb
    • app/models/otp_request.rb
    • app/models/concerns/auth/otp_request.rb

    After deleting them, runtime OTP code must use Catalyst::OtpRequest β€” either directly or through the user model's has_many :otp_requests, class_name: "Catalyst::OtpRequest" association. Resolve bare OtpRequest references left by the codemod to the gem class; they must not keep resolving to a host copy.

    If a copy added behavior the app still uses (extra scopes such as expired/unverified, a different delivery method), port just those additions by re-opening the gem class in an initializer rather than keeping the copy:

    # config/initializers/otp_request_extensions.rb
    Rails.application.config.to_prepare do
    Catalyst::OtpRequest.scope :unverified, -> { where.not(status: :verified) }
    end
  7. Port customized Devise behavior. If the deleted files were customized β€” a different user lookup, failure message or post-sign-in behavior β€” user lookup moves to config.user_lookup in config/initializers/catalyst.rb; anything deeper needs a custom Warden strategy registered by the host app. The codemod's output and git diff show exactly what was removed. With config.auth_method = :custom the gem does not register its strategy, so an app whose copies were a custom strategy must keep and register its own β€” move it out of the lib/devise paths above before running the codemod.

  8. Verify the gem implementation is the one running:

    bin/rails runner 'puts Catalyst::OtpRequest.instance_method(:deliver_otp).source_location.first'
    bin/rails runner 'puts Users::SessionsController.instance_method(:validate_credentials).source_location.first'

    Both paths must point inside the gem, not the host app's app/ directory. Then smoke-test the full sign-in flow (request OTP, receive the email, verify) before deploying β€” it exercises the new schema column end to end.

MCP tools for engine models are renamed​

Tools for engine models drop the prefix: cm_role_list becomes role_list, cm_platform_setting_get becomes platform_setting_get. When a host model already uses that name, the engine's tools become catalyst_role_list instead. Tools for host models keep their names.

Migration Steps​

  1. After deploying, reconnect or refresh MCP clients so they load the new tool list.
  2. Update any saved prompts or automations that call an engine model's tool by name.

options_url and target on form_field β†’ fetch_config​

Selects no longer use TomSelect (or the older Select2). Remote options are now served by Catalyst's own fetch_options endpoint, configured with fetch_config. Passing options_url: or target: to form_field raises NoMethodError.

Before

form_field :route_id, input_type: :single_select, options_url: "/admin/students/routes"

required a custom action returning [{id:, title:}] JSON.

After

form_field :route_id, input_type: :single_select,
fetch_config: { model: "Route", scope_name: "catalyst_search" }
app/models/route.rb
scope :catalyst_search, ->(search:) { where("name ILIKE ?", "%#{search}%") }

Fields that used target: { action_name: ... } to refill another field when their value changed are replaced by dependent_fields on the dependent field's fetch_config:

Before

form_field :transport_type_id, input_type: :single_select, target: { action_name: :fetch_routes }
form_field :route_id, input_type: :single_select

After

form_field :transport_type_id, input_type: :single_select, fetch_config: { model: "TransportType" }
form_field :route_id, input_type: :single_select,
fetch_config: { model: "Route", scope_name: "catalyst_search", dependent_fields: [:transport_type_id] }
app/models/route.rb
scope :catalyst_search, ->(search:, transport_type_id: nil) {
routes = where("name ILIKE ?", "%#{search}%")
transport_type_id.present? ? routes.where(transport_type_id:) : routes.none
}

See Remote options for every fetch_config key β€” including title_method, value_method, override_search and how the scope receives search:, dependent values and object_class:/object_id:. One rule to note: the scope must accept every keyword the config can send β€” a scope that rejects a keyword is called with no arguments and loses search: too.

If your app has custom JS or CSS that touches TomSelect/Select2 (TomSelect, select2, .ts-* classes), it no longer has any effect β€” selects are now rendered as comboboxes by the select Stimulus controller. Select filters, advanced filters and sorting dropdowns moved to the same combobox.

Flatpickr removed; date_time input renamed to datetime​

Date pickers now use vanilla-calendar-pro behind Catalyst's datepicker Stimulus controller; the flatpickr global and its controller are gone.

  1. input_type: :date_time raises ArgumentError β€” rename it to :datetime.
  2. config.display_date_format and config.display_datetime_format now take Ruby strftime strings instead of Flatpickr tokens. Update them in config/initializers/catalyst.rb β€” e.g. "d/m/Y" becomes "%d/%m/%Y" and "H:i" becomes "%H:%M". Defaults changed from "M d, Y" / "M d, Y, h:i K" to "%b %-d, %Y" / "%b %-d, %Y, %-I:%M %p".
  3. Custom JS that called flatpickr(...) or read the input value directly must move to the new contract: each picker has a hidden input (data-datepicker-target="value") carrying the submitted ISO value β€” assign .value on it or on the visible input, and listen for change on it. See Date Format.
  4. data-min-date / data-max-date still work. data-default-year-selector now widens the selectable range to 1900–2199 (it previously switched to free year entry).

See Date Format for the supported strftime directives and submitted values.

collection on filter removed​

Passing collection: to filter raises ArgumentError. Inline collections were evaluated when the DSL was defined, which forced the models they referenced to load during boot. Move the options into Catalyst::CustomHelper and use helper_method: instead β€” the helper runs at render time.

Before

filter :status, :single_select, collection: [["Open", "open"], ["Closed", "closed"]]
filter :approved, :single_select, collection: [["Yes", true], ["No", false]]

After

filter :status, :single_select, helper_method: :status_options
filter :approved, :single_select, helper_method: :ct_boolean_filter_options
app/helpers/catalyst/custom_helper.rb
def status_options
[["Open", "open"], ["Closed", "closed"]]
end

:ct_boolean_filter_options is built in for Yes/No filters. Large lists can use fetch_config on filters the same way as on form fields β€” see Remote options.

Database Changes​

Engine tables are renamed from cm_* to ct_*​

RenameCmTablesToCatalyst renames the engine's 18 tables (cm_roles β†’ ct_roles, cm_permissions β†’ ct_permissions, cm_roles_ct_user_groups β†’ ct_roles_user_groups, …), the columns named after them (cm_role_id β†’ ct_role_id, cm_oauth_client_id β†’ ct_oauth_client_id, cm_admin_installation_id β†’ catalyst_installation_id, …) and custom-named indexes. The Bridge-side ids on ct_support_tickets (ct_bridge_ticket_id, platform_ticket_id, catalyst_installation_id) are widened to bigint. It also rewrites class names stored in the database (CmRole β†’ Catalyst::Role) in polymorphic *_type columns, such as PaperTrail's versions.item_type, and in the engine's own class-name columns.

On PostgreSQL it leaves a view under each old table name that reads and writes the new table, so servers still running the previous release keep working during a rolling deploy.

Migration Steps​

  1. Install and run the migration:

    bin/rails catalyst:install_migrations
    bin/rails db:migrate

    RenameCmTablesToCatalyst is always installed first, before any other pending Catalyst migration.

  2. Deploy.

  3. Once no server runs the previous release, rewrite the class names those servers wrote during the deploy:

    bin/rails catalyst:backfill_class_names

    It prints how many rows it changed in each column, and can be run again safely.

  4. Move raw SQL, database views, triggers, reports and BI tools that name the old tables or columns to the new names. The codemod renames table names in SQL strings and where/joins hashes in Ruby code, but not outside the app. The compatibility views keep the old names working until Catalyst 11.

warning

On databases other than PostgreSQL no views are created. Stop every server running the previous release before running the migration.

warning

users.cm_role_id is renamed to users.ct_role_id, and associations such as user.cm_role and role.cm_permissions become user.ct_role and role.ct_permissions. Because users is a host table, the compatibility views cannot preserve its old column name. Renaming that column is not rolling-deploy safe for servers still running the previous release; coordinate the migration and deployment, or use a host-specific expand/copy/sync migration when zero downtime is required.

What Stays the Same​

  • The engine's mount path, /cm_admin. Engine-model URL segments still move from cm_* to ct_* (for example /cm_admin/cm_roles becomes /cm_admin/ct_roles).
  • Translations stored in the database under cm_admin.* keys: engine pages look up catalyst.* first, then cm_admin.*.
  • Queued jobs, mail deliveries and GlobalIDs that name an old class: they are still read.
  • The Bridge credentials key cm_admin: (catalyst: is read first, then cm_admin:).

Also in this release​

  • Namespaced models β€” models like Billing::Invoice can now be added to catalyst_models; their routes, helpers and MCP tools fold the namespace in with underscores (billing_invoice, billing_invoices). Boot raises an error if two models fold to the same name.
  • Shared loading indicator β€” async regions (chat widget, saved views, lazy frames) render the new Catalyst::UI::Loading component.
  • Remote option pagination and search β€” fetch_config results load in pages of 10, and typed text also runs through the fetch model's index :search filters unless override_search: true.

Rolling Back​

RenameCmTablesToCatalyst can be rolled back: it drops the views, puts the class names back (including rows written with the new names since the upgrade) and renames the tables and columns back. Roll back the database before deploying the previous release again. catalyst:install_migrations may have installed other Catalyst migrations after it, so roll back that many steps:

bin/rails db:rollback STEP=<number of migrations installed with the upgrade>

Checklist​

  1. Switch the Gemfile to catalyst and run bundle install.
  2. Run APPLY=1 bin/rails catalyst:upgrade, review the diff, work through its Change by hand list β€” including cm_admin: rake tasks in CI, scripts and deploy hooks β€” and then perform the residual CM sweep across the whole repository.
  3. Remove config.use_catalyst_otp from the initializer, update the existing otp_requests table for Catalyst::OtpRequest (email, delivery_channel and nullable user_id), delete the host copies of the authentication layer β€” the OTP methods in the user concern, the sessions and passwords controllers, the OTP request model and its concern β€” and point custom OTP generation/verification at Catalyst::OtpRequest.generate! / Catalyst::OtpRequest.verify?, porting any customizations (user lookup moves to config.user_lookup).
  4. Review every host override of an engine model moved under app/models/catalyst/, especially Catalyst::ApiToken. Delete unmodified or stale copies, port intentional customizations onto the gem implementation and keep the underlying tables and rows.
  5. Replace every options_url: form field with fetch_config, and move the URL-serving action's logic into a model scope.
  6. Replace target: { action_name: ... } linked fields with dependent_fields in the dependent field's fetch_config.
  7. Rename input_type: :date_time to :datetime, and rewrite display_date_format / display_datetime_format as strftime strings if you customized them.
  8. Move every collection: on filter into a Catalyst::CustomHelper method and switch to helper_method:.
  9. Check custom JS/CSS for TomSelect, select2, flatpickr or .ts-* / flatpickr classes and port it to the combobox/datepicker contracts.
  10. Run the test suite, then commit.
  11. Run catalyst:install_migrations and db:migrate, planning the users.cm_role_id rename around any zero-downtime deployment constraint.
  12. Deploy, then run catalyst:backfill_class_names.
  13. Reconnect MCP clients and update saved prompts or automations that call engine tools by name.
  14. Move raw SQL and external tools to the ct_ table names, ready for the views to be dropped in Catalyst 11.