Skip to content

Commit f7469e9

Browse files
committed
Merge branch 'feature/comment-pagaination' into develop
* feature/comment-pagaination: Revert comment pagination_param default 0
2 parents a6a9028 + 688d1e2 commit f7469e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/serializers/post_serializer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ def files
2222
end
2323
def comments
2424
comment_page = (instance_options.dig(:pagaination_param, :comment_page).presence || 1).to_i
25-
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || Pagination.per).to_i
25+
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || 0).to_i
2626
object.comments.published.by_date.page(comment_page).per(comment_per)
2727
end
2828
def comments_pagination
29-
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || Pagination.per).to_i
29+
comment_per = (instance_options.dig(:pagaination_param, :comment_per).presence || 0).to_i
3030
Pagination.build_json(comments)[:comments_pagination] if comment_per > 0
3131
end
3232
end

0 commit comments

Comments
 (0)