FIX: Notifications when no limit is provided

This commit is contained in:
Robin Ward 2015-09-02 15:48:41 -04:00
parent 4a6f617f4d
commit 73dba5af38
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class NotificationsController < ApplicationController
user = current_user user = current_user
if params[:recent].present? if params[:recent].present?
limit = params[:limit].to_i || 15 limit = (params[:limit] || 15).to_i
limit = 50 if limit > 50 limit = 50 if limit > 50
notifications = Notification.recent_report(current_user, limit) notifications = Notification.recent_report(current_user, limit)