Merge pull request #1271 from okriuchykhin/ok_SCI_2628

Fix error on activities page when user doesn't have any [SCI-2628]
This commit is contained in:
Alex Kriuchykhin 2018-08-22 14:21:18 +02:00 committed by GitHub
commit 0ca9972905
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,7 @@ class ActivitiesController < ApplicationController
activities = current_user.last_activities
.page(page)
.per(Constants::ACTIVITY_AND_NOTIF_SEARCH_LIMIT)
unless activities.last_page?
unless activities.blank? || activities.last_page?
more_url = url_for(
activities_url(
format: :json,