fix the query to only cycle thru the current authors posts

This commit is contained in:
Maxwell Salzberg 2012-02-17 17:01:00 -08:00 committed by danielgrippi
parent 0ab8ef1d08
commit 653e93fb11

View file

@ -41,10 +41,11 @@ class PostPresenter
protected
def post_base
if current_user
scope = if current_user
Post.owned_or_visible_by_user(current_user)
else
Post.all_public
end
scope.where(:author_id => post.author_id)
end
end