Skip to content

Commit c5446d7

Browse files
committed
Remove traces of embed option.
1 parent 64168cb commit c5446d7

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

lib/active_model/serializer/association.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Serializer
77
# @param [Hash{Symbol => Object}] options
88
#
99
# @example
10-
# Association.new(:comments, CommentSummarySerializer, embed: :ids)
10+
# Association.new(:comments, CommentSummarySerializer)
1111
#
1212
Association = Struct.new(:name, :serializer, :options) do
1313

test/fixtures/poro.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def custom_options
136136
cache key:'writer', skip_digest: true
137137
attributes :id, :name
138138

139-
has_many :posts, embed: :ids
140-
has_many :roles, embed: :ids
139+
has_many :posts
140+
has_many :roles
141141
has_one :bio
142142
end
143143

test/serializers/association_macros_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class AssociationMacrosTest < Minitest::Test
66
AuthorSummarySerializer = Class.new
77
class AssociationsTestSerializer < Serializer
88
belongs_to :author, serializer: AuthorSummarySerializer
9-
has_many :comments, embed: :ids
9+
has_many :comments
1010
has_one :category
1111
end
1212

@@ -21,7 +21,7 @@ def test_has_one_defines_reflection
2121
end
2222

2323
def test_has_many_defines_reflection
24-
has_many_reflection = HasManyReflection.new(:comments, embed: :ids)
24+
has_many_reflection = HasManyReflection.new(:comments, {})
2525

2626
assert_includes(@reflections, has_many_reflection)
2727
end

test/serializers/associations_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def test_has_many_and_has_one
5252

5353
case key
5454
when :posts
55-
assert_equal({ embed: :ids }, options)
55+
assert_equal({}, options)
5656
assert_kind_of(ActiveModel::Serializer.config.array_serializer, serializer)
5757
when :bio
5858
assert_equal({}, options)
5959
assert_nil serializer
6060
when :roles
61-
assert_equal({ embed: :ids }, options)
61+
assert_equal({}, options)
6262
assert_kind_of(ActiveModel::Serializer.config.array_serializer, serializer)
6363
else
6464
flunk "Unknown association: #{key}"

0 commit comments

Comments
 (0)