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.
:::
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:
-
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.
-
Apply the codemod and resolve its Change by hand output. Treat that output as incomplete.
-
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]' -
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.
-
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.
-
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 asCmRole, associations such ascm_role,cm_admin:*tasks,cm_admin_models, spec helpers, raw SQL namingcm_*tables, moved engine-model overrides such asapp/models/catalyst/api_token.rb, and host OTP copies or references such asapp/models/otp_request.rb,app/models/catalyst/otp_request.rband bareOtpRequest. - JavaScript and TypeScript:
window.CmAdmin,cmAdminConfig, thecm-admin:view-changedevent, camel-casecm*identifiers and hard-coded engine-model URLs such as/cm_admin/cm_roles(keep/cm_admin; changecm_rolestoct_roles). - CSS, SCSS and templates:
.cm-admin,.cm-admin-static, other.cm-*classes,--cm-*custom properties anddata-cm-*attributes. - YAML, CI, shell, Docker and package scripts: the
cm-admingem name,cm_admin:*tasks, old generator names, deploy commands and SQL scripts.
Rename rules for the residual sweepβ
| Kind of match | Correct v10 form | Examples |
|---|---|---|
| CM Admin product, module, folder, rake, generator or locale-root references | Catalyst/catalyst | CmAdmin β Catalyst; cm_admin:verify β catalyst:verify; app/views/cm_admin/ β app/views/catalyst/; the cm_admin: locale root β catalyst: |
| Engine model and constant names | Namespaced Catalyst::* constant | CmRole β Catalyst::Role; CtFileExport β Catalyst::FileExport; SendCmAdminEmailJob β Catalyst::SendEmailJob |
Cm/cm inside a host app's camel-case identifier | Ct/ct | MyCmRole β MyCtRole; cmRoleId β ctRoleId |
| Catalyst-owned snake_case names | cm_ β ct_, unless it is a cm_admin framework name or an admin DSL method | cm_role β ct_role; cm_index_user_path β ct_index_user_path; cm_admin_models β catalyst_models |
| Admin DSL methods | Drop the cm_ prefix | cm_index β index; cm_show_section β show_section |
| Kebab-case CSS, data and event names | cm- β ct-; cm-admin β catalyst | data-cm-id β data-ct-id; .cm-admin-static β .catalyst-static; cm-admin:view-changed β catalyst:view-changed |
| Engine table and column names | The exact database rename | cm_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:
| Match | Why 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.sql | These 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 release | They 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 names | Catalyst 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 Admin | Examples 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β
| Before | After |
|---|---|
gem "cm-admin" | gem "better-platforms-catalyst", from the private gem server |
CmAdmin, CmAdmin::Engine | Catalyst, Catalyst::Engine |
CmRole, CmPermission, CtFileExport | Catalyst::Role, Catalyst::Permission, Catalyst::FileExport |
ApiToken, OtpRequest, Translation | Catalyst::ApiToken, Catalyst::OtpRequest, Catalyst::Translation |
CmAdmin::BlogPost (admin concern) | Catalyst::Admin::BlogPost |
config/initializers/cm_admin.rb | config/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β
-
Switch the Gemfile entry:
source "https://gems.betterplatforms.dev" dogem "better-platforms-catalyst", "~> 10.0"end -
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.rbonly removes the Ruby override; theapi_tokenstable 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β
| Before | After |
|---|---|
cm_admin do β¦ cm_index, cm_show, cm_section | catalyst 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:build | rails catalyst:install_migrations, catalyst:verify, catalyst:scss:build |
rails generate cm_admin:β¦ | rails generate catalyst:β¦ |
window.CmAdmin in JavaScript | window.Catalyst |
window.cmAdminConfig, the cm-admin:view-changed event | window.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::CmAdminAuthenticatable | devise :catalyst_authenticatable, Devise::Strategies::CatalystAuthenticatable |
SendCmAdminEmailJob | Catalyst::SendEmailJob |
Contracts::CmApi::CmComments::CreateContract | Catalyst::Api::Comments::CreateContract |
Blueprints::CmApi::CmCommentBlueprint, Blueprints::CmApi::CmSupportTicketBlueprint | Catalyst::Api::CommentBlueprint, Catalyst::Api::SupportTicketBlueprint |
CmApi::CmSupportTicketsController, CmApi::CmSupportTickets::* | Catalyst::Api::SupportTicketsController, Catalyst::Api::SupportTickets::* |
config.cm_admin_models | config.catalyst_models |
Catalyst::Mailer#cm_admin_mail | Catalyst::Mailer#send_email |
cm_recognize_path helper | catalyst_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β
-
Preview the changes. Nothing is written:
bin/rails catalyst:upgradeDIFF=1 bin/rails catalyst:upgrade # also prints a diff for each file -
Apply them:
APPLY=1 bin/rails catalyst:upgradeThe codemod refuses to run with uncommitted changes, so the result can be reviewed with
git diffand undone withgit checkout. -
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 tocatalyst:.- Remaining
CmAdminreferences, for example in JavaScript (window.CmAdmin). - Files that define
OtpRequest,Translation,ApiTokenorRubyLlmUsageinside 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.
-
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.
-
Run the test suite, then commit.
Spec helpers are renamedβ
The codemod renames these in spec/ and test/:
| Before | After |
|---|---|
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_for | def catalyst_user, def catalyst_record_for |
it_behaves_like "cm_admin pages render" | it_behaves_like "catalyst pages render" |
cm_admin_errors: :allow | catalyst_errors: :allow |
"action.cm_admin" notification | "action.catalyst" |
Matcher names (succeed, list_records, be_allowed_to, β¦) don't change.
Migration Stepsβ
- Nothing beyond running the codemod and the residual CM sweep. If the app's own spec helpers wrap these methods outside
spec/ortest/, 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_authenticatableDevise strategy and model module (lib/devise/) Users::SessionsControllerandUsers::PasswordsController, complete with the OTP flow, password reset and password update actions- the
Catalyst::OtpSessionscontroller concern behind them - the
Catalyst::OtpRequestmodel, including thegenerate!/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.rbandlib/devise/models/cm_admin_authenticatable.rb(alsocatalyst_authenticatablecopies)Devise.add_module,Warden::Strategies.addandDevise::Models.autoloadstatements for those modules, andrequirelines that load the copiesinclude OtpAuthenticatablestatements, wherever they appear (anincludemixing 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β
-
Remove
config.use_catalyst_otp = truefromconfig/initializers/catalyst.rb. -
Keep the
otp_requeststable, but update it forCatalyst::OtpRequest. Do not drop or recreate the table; the gem's model uses the same table and existing rows can stay. It readsemailwhen delivering and usesdelivery_channelto choose the delivery method. On a table withoutemailthe delivery error is rescued and logged, so OTPs silently never arrive. Add a migration:class UpdateOtpRequestsForCatalyst < ActiveRecord::Migration[8.0]def changeenable_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, trueendenduser_idbecomes nullable so OTPs can be generated for email addresses with no user record (invitations and similar flows). Existing rows are unaffected;delivery_channelcan stay null on rows created before the column existed. -
Slim the user model's auth concern (usually
app/models/concerns/auth/user.rb). The codemod removesinclude OtpAuthenticatablelines 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_authenticatabledeclaration,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 caller Replacement 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 ofuser::otp_request = Catalyst::OtpRequest.generate!(email:, delivery_channel: :email)verified = Catalyst::OtpRequest.verify?(email:, otp:)Two behavioral differences to check in callers:
generate!raisesActiveRecord::RecordInvalidwhen the resend limit is hit, wherecreate_otp_requestreturned an invalid record β rescue it the wayCatalyst::Auth::RequestOtpdoes. And theprevious_otp_statusargument is gone: generating a new OTP always cancels the previous active requests. -
Delete the sessions controller copy at
app/controllers/users/sessions_controller.rbif 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 Usersclass SessionsController < Devise::SessionsControllerlayout "ct_session"helper Catalyst::ViewHelpersinclude 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 hereendendThe gem controller's source is the reference (
app/controllers/users/sessions_controller.rbin the gem);after_successful_sign_inandafter_sign_in_redirect_pathare the intended extension points for post-login behavior. -
Delete the passwords controller copy at
app/controllers/users/passwords_controller.rbon the same terms β the gem's controller covers token validation,editandupdate. -
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-levelapp/models/otp_request.rbhere, so check even if the app never had this path beforeapp/models/cm_admin/otp_request.rbapp/models/otp_request.rbapp/models/concerns/auth/otp_request.rb
After deleting them, runtime OTP code must use
Catalyst::OtpRequestβ either directly or through the user model'shas_many :otp_requests, class_name: "Catalyst::OtpRequest"association. Resolve bareOtpRequestreferences 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.rbRails.application.config.to_prepare doCatalyst::OtpRequest.scope :unverified, -> { where.not(status: :verified) }end -
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_lookupinconfig/initializers/catalyst.rb; anything deeper needs a custom Warden strategy registered by the host app. The codemod's output andgit diffshow exactly what was removed. Withconfig.auth_method = :customthe 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 thelib/devisepaths above before running the codemod. -
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β
- After deploying, reconnect or refresh MCP clients so they load the new tool list.
- 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" }
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] }
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.
input_type: :date_timeraisesArgumentErrorβ rename it to:datetime.config.display_date_formatandconfig.display_datetime_formatnow take Rubystrftimestrings instead of Flatpickr tokens. Update them inconfig/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".- 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.valueon it or on the visible input, and listen forchangeon it. See Date Format. data-min-date/data-max-datestill work.data-default-year-selectornow 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
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β
-
Install and run the migration:
bin/rails catalyst:install_migrationsbin/rails db:migrateRenameCmTablesToCatalystis always installed first, before any other pending Catalyst migration. -
Deploy.
-
Once no server runs the previous release, rewrite the class names those servers wrote during the deploy:
bin/rails catalyst:backfill_class_namesIt prints how many rows it changed in each column, and can be run again safely.
-
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/joinshashes in Ruby code, but not outside the app. The compatibility views keep the old names working until Catalyst 11.
On databases other than PostgreSQL no views are created. Stop every server running the previous release before running the migration.
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 fromcm_*toct_*(for example/cm_admin/cm_rolesbecomes/cm_admin/ct_roles). - Translations stored in the database under
cm_admin.*keys: engine pages look upcatalyst.*first, thencm_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, thencm_admin:).
Also in this releaseβ
- Namespaced models β models like
Billing::Invoicecan now be added tocatalyst_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::Loadingcomponent. - Remote option pagination and search β
fetch_configresults load in pages of 10, and typed text also runs through the fetch model'sindex:searchfilters unlessoverride_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β
- Switch the Gemfile to
catalystand runbundle install. - Run
APPLY=1 bin/rails catalyst:upgrade, review the diff, work through its Change by hand list β includingcm_admin:rake tasks in CI, scripts and deploy hooks β and then perform the residual CM sweep across the whole repository. - Remove
config.use_catalyst_otpfrom the initializer, update the existingotp_requeststable forCatalyst::OtpRequest(email,delivery_channeland nullableuser_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 atCatalyst::OtpRequest.generate!/Catalyst::OtpRequest.verify?, porting any customizations (user lookup moves toconfig.user_lookup). - Review every host override of an engine model moved under
app/models/catalyst/, especiallyCatalyst::ApiToken. Delete unmodified or stale copies, port intentional customizations onto the gem implementation and keep the underlying tables and rows. - Replace every
options_url:form field withfetch_config, and move the URL-serving action's logic into a model scope. - Replace
target: { action_name: ... }linked fields withdependent_fieldsin the dependent field'sfetch_config. - Rename
input_type: :date_timeto:datetime, and rewritedisplay_date_format/display_datetime_formatasstrftimestrings if you customized them. - Move every
collection:onfilterinto aCatalyst::CustomHelpermethod and switch tohelper_method:. - Check custom JS/CSS for
TomSelect,select2,flatpickror.ts-*/ flatpickr classes and port it to the combobox/datepicker contracts. - Run the test suite, then commit.
- Run
catalyst:install_migrationsanddb:migrate, planning theusers.cm_role_idrename around any zero-downtime deployment constraint. - Deploy, then run
catalyst:backfill_class_names. - Reconnect MCP clients and update saved prompts or automations that call engine tools by name.
- Move raw SQL and external tools to the
ct_table names, ready for the views to be dropped in Catalyst 11.