Skip to content

Commit 08dab30

Browse files
committed
Fix tests
1 parent 2c6ee10 commit 08dab30

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

app/controllers/users_controller.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@ def show
5050
@posts = set_posts.user_sort({ term: params[:sort], default: :score },
5151
age: :created_at, score: :score)
5252

53-
@total_post_count = if @user == current_user
54-
@user.posts.undeleted.count
55-
else
56-
@user.posts.count
57-
end
53+
@total_post_count = Post.all.by(@user).count
5854
@posts = @posts.first(@limit)
5955
render layout: 'without_sidebar'
6056
end

0 commit comments

Comments
 (0)