mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove traces of embed option.
This commit is contained in:
@@ -6,7 +6,7 @@ module ActiveModel
|
||||
AuthorSummarySerializer = Class.new
|
||||
class AssociationsTestSerializer < Serializer
|
||||
belongs_to :author, serializer: AuthorSummarySerializer
|
||||
has_many :comments, embed: :ids
|
||||
has_many :comments
|
||||
has_one :category
|
||||
end
|
||||
|
||||
@@ -21,7 +21,7 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def test_has_many_defines_reflection
|
||||
has_many_reflection = HasManyReflection.new(:comments, embed: :ids)
|
||||
has_many_reflection = HasManyReflection.new(:comments, {})
|
||||
|
||||
assert_includes(@reflections, has_many_reflection)
|
||||
end
|
||||
|
||||
@@ -52,13 +52,13 @@ module ActiveModel
|
||||
|
||||
case key
|
||||
when :posts
|
||||
assert_equal({ embed: :ids }, options)
|
||||
assert_equal({}, options)
|
||||
assert_kind_of(ActiveModel::Serializer.config.array_serializer, serializer)
|
||||
when :bio
|
||||
assert_equal({}, options)
|
||||
assert_nil serializer
|
||||
when :roles
|
||||
assert_equal({ embed: :ids }, options)
|
||||
assert_equal({}, options)
|
||||
assert_kind_of(ActiveModel::Serializer.config.array_serializer, serializer)
|
||||
else
|
||||
flunk "Unknown association: #{key}"
|
||||
|
||||
Reference in New Issue
Block a user