mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix infinite recursion
The method for testing whether to include an association was causing an infinite loop when two models referenced each other.
This commit is contained in:
@@ -7,6 +7,7 @@ module ActiveModel
|
||||
class CollectionTest < Minitest::Test
|
||||
def setup
|
||||
@author = Author.new(id: 1, name: 'Steve K.')
|
||||
@author.bio = nil
|
||||
@first_post = Post.new(id: 1, title: 'Hello!!', body: 'Hello, world!!')
|
||||
@second_post = Post.new(id: 2, title: 'New Post', body: 'Body')
|
||||
@first_post.comments = []
|
||||
|
||||
Reference in New Issue
Block a user