mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 04:59:22 -06:00
Remove gunk from post stream serializer mixin (#4176)
This commit is contained in:
parent
6338720d1a
commit
c0138c0277
@ -16,10 +16,8 @@ module PostStreamSerializerMixin
|
|||||||
def posts
|
def posts
|
||||||
return @posts if @posts.present?
|
return @posts if @posts.present?
|
||||||
@posts = []
|
@posts = []
|
||||||
highest_number_in_posts = 0
|
|
||||||
if object.posts
|
if object.posts
|
||||||
object.posts.each_with_index do |p, idx|
|
object.posts.each do |p|
|
||||||
highest_number_in_posts = p.post_number if p.post_number > highest_number_in_posts
|
|
||||||
ps = PostSerializer.new(p, scope: scope, root: false)
|
ps = PostSerializer.new(p, scope: scope, root: false)
|
||||||
ps.add_raw = true if @options[:include_raw]
|
ps.add_raw = true if @options[:include_raw]
|
||||||
ps.topic_view = object
|
ps.topic_view = object
|
||||||
|
Loading…
Reference in New Issue
Block a user