{"record":{"id":"1b86b038730dbdb7","repo":"railsadminteam/rails_admin","slug":"the-total-columns-width-configuration-option-is-de","errorCode":null,"errorMessage":"The total_columns_width configuration option is deprecated and has no effect.","messagePattern":"The total_columns_width configuration option is deprecated and has no effect\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/rails_admin/config.rb","lineNumber":287,"sourceCode":"          @default_hidden_fields = fields\n        end\n      end\n\n      def parent_controller=(name)\n        @parent_controller = name\n\n        if defined?(RailsAdmin::ApplicationController) || defined?(RailsAdmin::MainController)\n          RailsAdmin::Config::ConstLoadSuppressor.allowing do\n            RailsAdmin.send(:remove_const, :ApplicationController)\n            RailsAdmin.send(:remove_const, :MainController)\n            load RailsAdmin::Engine.root.join('app/controllers/rails_admin/application_controller.rb')\n            load RailsAdmin::Engine.root.join('app/controllers/rails_admin/main_controller.rb')\n          end\n        end\n      end\n\n      def total_columns_width=(_)\n        ActiveSupport::Deprecation.warn('The total_columns_width configuration option is deprecated and has no effect.')\n      end\n\n      def sidescroll=(_)\n        ActiveSupport::Deprecation.warn('The sidescroll configuration option was removed, it is always enabled now.')\n      end\n\n      # Setup actions to be used.\n      def actions(&block)\n        return unless block\n\n        RailsAdmin::Config::Actions.reset\n        RailsAdmin::Config::Actions.instance_eval(&block)\n      end\n\n      # Returns all model configurations\n      #\n      # @see RailsAdmin::Config.registry\n      def models","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/railsadminteam/rails_admin/blob/0690a5e62f8d99bc00495a3754f5189b23124387/lib/rails_admin/config.rb#L269-L305","documentation":"RailsAdmin 3.x replaced the old fixed-width list table layout. The global total_columns_width= setter (lib/rails_admin/config.rb:287) was kept only as a no-op that emits an ActiveSupport::Deprecation warning, so old initializers do not crash. The value you pass is discarded — column widths are now handled by CSS/scrolling in the redesigned list view.","triggerScenarios":"Any initializer (config/initializers/rails_admin.rb) still containing `config.total_columns_width = <number>` (e.g. 130). The warning prints once when the initializer is evaluated at boot, and again per process restart / precompile run.","commonSituations":"Upgrading rails_admin 2.x → 3.x with an initializer written against the old table-layout API; copying a legacy initializer from another project; deprecation warnings treated as errors in CI (ActiveSupport::Deprecation.behavior = :raise) making the build fail.","solutions":["Delete the `config.total_columns_width = ...` line from the initializer — there is no replacement because the option has no effect anymore.","If column width control is genuinely needed, do it with custom CSS targeting the new list view (e.g. overriding width of sticky columns) instead of the config option.","Grep the initializer directory for other removed 2.x options (sidescroll, momentjs_format, total_columns_width) in the same pass so you fix them together."],"exampleFix":"# before: config/initializers/rails_admin.rb\nRailsAdmin.config do |config|\n  config.total_columns_width = 130\nend\n\n# after: option removed, nothing replaces it\nRailsAdmin.config do |config|\n  # list column widths are now CSS-driven; no config needed\nend","handlingStrategy":"validation","validationCode":"# Audit initializers for removed rails_admin 2.x options before/after upgrades\nremoved = %w[total_columns_width sidescroll]\nDir[Rails.root.join('config/initializers/*.rb')].each do |path|\n  text = File.read(path)\n  removed.each { |opt| puts \"#{path}: remove deprecated `#{opt}`\" if text =~ /config\\.#{opt}\\s*=/ }\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat rails_admin major upgrades as initializer migrations: diff your rails_admin.rb against the current README example.","Run your admin request specs with ActiveSupport::Deprecation.behavior = :raise in the test environment so stale options fail CI immediately.","After any gem bump, load one admin index and edit page in development and read the log for deprecation output before shipping."],"tags":["rails-admin","deprecation","configuration","ruby","upgrade"],"backgroundTag":"deprecated-config-option","analyzedSha":"0690a5e62f8d99bc00495a3754f5189b23124387","analyzedAt":"2026-08-21T18:31:19.382Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}