From 439643ba5a0a844995138341ab3268b903415f2e Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 24 Oct 2013 19:15:13 -0200 Subject: [PATCH] Fix the stupid previous commit --- lib/active_model/serializer.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/active_model/serializer.rb b/lib/active_model/serializer.rb index a3fcf82a..563bef67 100644 --- a/lib/active_model/serializer.rb +++ b/lib/active_model/serializer.rb @@ -9,6 +9,8 @@ module ActiveModel class Serializer include Serializable + @mutex = Mutex.new + class << self def inherited(base) base._attributes = [] @@ -16,7 +18,7 @@ module ActiveModel end def setup - Mutex.new.synchronize do + @mutex.synchronize do yield CONFIG end end