mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Associations doesn't depend on the source serializer anymore :)
This commit is contained in:
@@ -2,9 +2,8 @@ module ActiveModel
|
||||
class Serializer
|
||||
module Associations #:nodoc:
|
||||
class Config #:nodoc:
|
||||
def initialize(name, source, options={})
|
||||
def initialize(name, options={})
|
||||
@name = name
|
||||
@source = source
|
||||
@options = options
|
||||
end
|
||||
|
||||
@@ -13,10 +12,6 @@ module ActiveModel
|
||||
serializer.is_a?(String) ? serializer.constantize : serializer
|
||||
end
|
||||
|
||||
def source_serializer
|
||||
@source
|
||||
end
|
||||
|
||||
def key
|
||||
options[:key] || @name
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user