diff --git a/lib/rails_admin/adapters/active_record.rb b/lib/rails_admin/adapters/active_record.rb index 3f8371d34b..56cb439906 100644 --- a/lib/rails_admin/adapters/active_record.rb +++ b/lib/rails_admin/adapters/active_record.rb @@ -75,7 +75,7 @@ def encoding when 'postgresql' ::ActiveRecord::Base.connection.select_one("SELECT ''::text AS str;").values.first.encoding when 'mysql2' - ::ActiveRecord::Base.connection.instance_variable_get(:@connection).encoding + ::ActiveRecord::Base.connection.raw_connection.encoding when 'oracle_enhanced' ::ActiveRecord::Base.connection.select_one("SELECT dummy FROM DUAL").values.first.encoding else