Reduce count of projects on dashboard to 20

This commit is contained in:
randx 2012-10-09 10:01:07 +03:00
parent ce1b742b1e
commit c348284fed

View file

@ -4,7 +4,7 @@ class DashboardController < ApplicationController
def index def index
@groups = Group.where(id: current_user.projects.pluck(:group_id)) @groups = Group.where(id: current_user.projects.pluck(:group_id))
@projects = current_user.projects_with_events @projects = current_user.projects_with_events
@projects = @projects.page(params[:page]).per(40) @projects = @projects.page(params[:page]).per(20)
@events = Event.recent_for_user(current_user).limit(20).offset(params[:offset] || 0) @events = Event.recent_for_user(current_user).limit(20).offset(params[:offset] || 0)
@last_push = current_user.recent_push @last_push = current_user.recent_push