fix projects sorting; fix Postgresql issue with LIMIT and DISTINCT; fix query performance

This commit is contained in:
Alexey Loktionov 2012-11-16 22:31:17 +04:00
parent b339c747a9
commit 31bf0cd876
3 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ class DashboardController < ApplicationController
def index
@groups = Group.where(id: current_user.projects.pluck(:group_id))
@projects = current_user.projects_with_events
@projects = current_user.projects_sorted_by_activity
@projects = @projects.page(params[:page]).per(30)
@events = Event.in_projects(current_user.project_ids)