chore: enable ActiveRecord logging in Rails console for better debugging (#16)

This commit is contained in:
Gabriel Jablonski 2025-04-03 22:30:57 -03:00 committed by gabrieljablonski
parent e930820f68
commit 02732b3db6

View File

@ -59,6 +59,8 @@ module Chatwoot
# https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
# FIX ME : fixes breakage of installation config. we need to migrate.
config.active_record.yaml_column_permitted_classes = [ActiveSupport::HashWithIndifferentAccess]
ActiveRecord::Base.logger = ActiveSupport::Logger.new($stdout) if defined?(Rails::Console)
end
def self.config