Skip to content

Commit 508a712

Browse files
committed
Changed nedsted comment per 10 to 0
1 parent fe2d232 commit 508a712

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/serializers/post_serializer.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def files
1212
end
1313
def comments
1414
comment_page = (instance_options.dig(:pagaination_param, :comment_page).presence || 1).to_i
15-
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || 10).to_i
15+
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || 0).to_i
1616
object.comments.published.by_date.page(comment_page).per(comment_per)
1717
end
1818
def comments_pagination
19-
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || 10).to_i
19+
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || 0).to_i
2020
Pagination.build_json(comments)[:comments_pagination] if comment_per > 0
2121
end
2222
end

0 commit comments

Comments
 (0)