Skip to content

Commit 57e23db

Browse files
committed
Changed null check present to presence
1 parent 84114bb commit 57e23db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: app/controllers/api/v1/posts_controller.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def destroy
6767
private
6868
# Use callbacks to share common setup or constraints between actions.
6969
def comment_pagination_params
70-
@comment_page = params[:comment_page].present? ? params[:comment_page] : 1
71-
@comment_per = params[:comment_per].present? ? params[:comment_per] : Pagination.per
70+
@comment_page = params[:comment_page].presence || 1
71+
@comment_per = params[:comment_per].presence || Pagination.per
7272
end
7373

7474
def set_post

0 commit comments

Comments
 (0)