fix the query to only cycle thru the current authors posts
This commit is contained in:
parent
0ab8ef1d08
commit
653e93fb11
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
Loading…
Reference in a new issue