diff options
Diffstat (limited to 'app/controllers/dashboard_controller.rb')
-rw-r--r-- | app/controllers/dashboard_controller.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index a054940738e..8508e2454d2 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -2,15 +2,13 @@ class DashboardController < ApplicationController respond_to :html def index - @projects = current_user.projects.includes(:events).order("events.created_at DESC") - @projects = @projects.page(params[:page]).per(40) - - @events = Event.where(:project_id => current_user.projects.map(&:id)).recent.limit(20) - + @projects = current_user.projects_with_events.page(params[:page]).per(40) + @events = Event.recent_for_user(current_user).limit(20).offset(params[:offset] || 0) @last_push = current_user.recent_push respond_to do |format| format.html + format.js format.atom { render :layout => false } end end |