mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Remove ActiveModel::Serializer.setup
This commit is contained in:
parent
0ba4830dee
commit
832a269e98
@ -4,15 +4,12 @@ require 'active_model/serializer/associations'
|
||||
require 'active_model/serializer/configuration'
|
||||
require 'active_model/serializer/dsl'
|
||||
|
||||
require 'thread'
|
||||
require 'forwardable'
|
||||
|
||||
module ActiveModel
|
||||
class Serializer
|
||||
include Serializable
|
||||
|
||||
@mutex = Mutex.new
|
||||
|
||||
class << self
|
||||
def inherited(base)
|
||||
base._root = _root
|
||||
@ -20,12 +17,6 @@ module ActiveModel
|
||||
base._associations = (_associations || {}).dup
|
||||
end
|
||||
|
||||
def setup
|
||||
@mutex.synchronize do
|
||||
yield Configuration.global
|
||||
end
|
||||
end
|
||||
|
||||
def embed(type, options={})
|
||||
Configuration.global.embed = type
|
||||
Configuration.global.embed_in_root = true if options[:embed_in_root] || options[:include]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user