Skip to content

Commit

Permalink
Add Railtie
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed Apr 21, 2024
1 parent 0881ca3 commit 7adb046
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mongoid/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def handle_configuration_error(error)

# Add custom serializers for BSON::ObjectId
initializer 'mongoid.active_job.custom_serializers' do
require 'mongoid/railties/bson_object_id_serializer'
ActiveSupport.on_load :active_job do
require 'mongoid/railties/bson_object_id_serializer'

config.after_initialize do
ActiveJob::Serializers.add_serializers(
[::Mongoid::Railties::ActiveJobSerializers::BsonObjectIdSerializer]
)
Expand Down

0 comments on commit 7adb046

Please sign in to comment.