lib/adequate_serialization.rb in adequate_serialization-1.0.1 vs lib/adequate_serialization.rb in adequate_serialization-2.0.0

- old
+ new

@@ -1,13 +1,25 @@ # frozen_string_literal: true +require 'oj' + module AdequateSerialization class Error < StandardError def initialize(message) super(message.gsub("\n", ' ')) end end + + class << self + attr_accessor :active_job_queue + + def configure + yield self + end + end + + self.active_job_queue = :default end require 'adequate_serialization/attribute' require 'adequate_serialization/decorator' require 'adequate_serialization/inline_serializer' @@ -28,6 +40,8 @@ module AdequateSerialization Serializer.singleton_class.prepend(CacheBusting) ActiveRecord::Base.include(Serializable) end + + Oj.optimize_rails end