Endless event loading for dsahboard
This commit is contained in:
parent
860fa1163a
commit
a69fc5dd23
5 changed files with 10 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue