hide deleted posts in tag subscriptions/favorites

This commit is contained in:
r888888888
2013-05-13 10:45:33 -07:00
parent 6f8271c412
commit e3493f6cd3
2 changed files with 11 additions and 1 deletions

View File

@@ -6,6 +6,10 @@ module PostSets
@params = params
@user = ::User.find(user_id)
@favorites = ::Favorite.for_user(user.id).paginate(page, :limit => limit).order("favorites.id desc")
if CurrentUser.user.hide_deleted_posts?
@favorites = @favorites.where("is_deleted = false")
end
end
def limit