Endless event loading for dsahboard

This commit is contained in:
randx 2012-07-21 10:23:05 +03:00
parent 860fa1163a
commit a69fc5dd23
5 changed files with 10 additions and 8 deletions

View file

@ -3,11 +3,12 @@ class DashboardController < ApplicationController
def index
@projects = current_user.projects_with_events.page(params[:page]).per(40)
@events = Event.recent_for_user(current_user).limit(20)
@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