From c0138c0277fe35933cbcba582ab132405e21c12e Mon Sep 17 00:00:00 2001 From: James Kiesel Date: Tue, 19 Apr 2016 03:55:23 +1200 Subject: [PATCH] Remove gunk from post stream serializer mixin (#4176) --- app/serializers/post_stream_serializer_mixin.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/serializers/post_stream_serializer_mixin.rb b/app/serializers/post_stream_serializer_mixin.rb index e5edb78978e..55cb5c86d4c 100644 --- a/app/serializers/post_stream_serializer_mixin.rb +++ b/app/serializers/post_stream_serializer_mixin.rb @@ -16,10 +16,8 @@ module PostStreamSerializerMixin def posts return @posts if @posts.present? @posts = [] - highest_number_in_posts = 0 if object.posts - object.posts.each_with_index do |p, idx| - highest_number_in_posts = p.post_number if p.post_number > highest_number_in_posts + object.posts.each do |p| ps = PostSerializer.new(p, scope: scope, root: false) ps.add_raw = true if @options[:include_raw] ps.topic_view = object