mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Move synchronize to setup method and make CONFIG private
This commit is contained in:
@@ -3,6 +3,8 @@ require 'active_model/serializable'
|
||||
require 'active_model/serializer/associations'
|
||||
require 'active_model/serializer/config'
|
||||
|
||||
require 'thread'
|
||||
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
include Serializable
|
||||
@@ -14,7 +16,9 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def setup
|
||||
yield CONFIG
|
||||
Mutex.new.synchronize do
|
||||
yield CONFIG
|
||||
end
|
||||
end
|
||||
|
||||
def embed(type, options={})
|
||||
|
||||
Reference in New Issue
Block a user