diff options
author | Raphael Sofaer <raphael@joindiaspora.com> | 2011-04-14 01:35:20 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-04-14 01:35:20 +0400 |
commit | efe79eb3517e4e77c979aa19492457326686bbb3 (patch) | |
tree | aafcacb6f36883ef2ed100ec771a4c1d22af2dc2 /app/controllers/aspects_controller.rb | |
parent | 9383388bb67e2ba903ba6bba3eec21dc35fd13fd (diff) |
Fix stream on pages other than 1, rename raw_visible_posts to visible_posts
Diffstat (limited to 'app/controllers/aspects_controller.rb')
-rw-r--r-- | app/controllers/aspects_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 9a66779aa..6da08ba72 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -30,10 +30,10 @@ class AspectsController < ApplicationController @selected_contacts = @aspects.map { |aspect| aspect.contacts }.flatten.uniq unless params[:only_posts] @aspect_ids = @aspects.map { |a| a.id } - posts = current_user.raw_visible_posts(:by_members_of => @aspect_ids, + posts = current_user.visible_posts(:by_members_of => @aspect_ids, :type => 'StatusMessage', :order => session[:sort_order] + ' DESC', - :page => params[:page] + :max_time => params[:max_time].to_i ).includes(:comments, :mentions, :likes, :dislikes) @posts = PostsFake.new(posts) @@ -160,6 +160,10 @@ class AspectsController < ApplicationController @aspect.save end + def ensure_page + params[:max_time] ||= Time.now + 1 + end + protected def save_sort_order |