Permalink
Browse files

adding support for settings in live feed

  • Loading branch information...
1 parent 22b83f9 commit 44efb6bb93a7de7ccfe16f28583cd1082216b1b4 bthesorceror committed Mar 15, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 app/controllers/user_status_controller.rb
View
6 app/controllers/user_status_controller.rb
@@ -56,14 +56,12 @@ def historic
def live_feed
unless params[:format] == "js"
@status = UserStatus.new
- @statuses = UserStatus.all :order => "created_at DESC",
- :limit => 100,
- :include => :user
+ @statuses = UserStatus.history
session[:last_status_check] = @statuses.first.created_at if @statuses.size > 0
else
@old_time = session[:last_status_check]
@statuses = UserStatus.all :conditions => ["created_at > ?", @old_time],
- :order => "created_at DESC"
+ :order => "created_at DESC"
session[:last_status_check] = @statuses.first.created_at if @statuses.size > 0
render :template => "user_status/live_feed_js", :layout => false
end

0 comments on commit 44efb6b

Please sign in to comment.