feat: バグ直し(#223) (#224)

#223

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #224
This commit was merged in pull request #224.
This commit is contained in:
2026-01-15 22:02:20 +09:00
parent fa2030f9a5
commit c8c262e34d
2 changed files with 65 additions and 16 deletions
+6 -2
View File
@@ -44,7 +44,11 @@ class PostsController < ApplicationController
nil
end
end
}, count: filtered_posts.count(:id), next_cursor: }
}, count: if filtered_posts.group_values.present?
filtered_posts.count.size
else
filtered_posts.count
end, next_cursor: }
end
def random
@@ -181,7 +185,7 @@ class PostsController < ApplicationController
private
def filtered_posts
tag_names = params[:tags]&.split(' ')
tag_names = params[:tags].to_s.split(' ')
match_type = params[:match]
if tag_names.present?
filter_posts_by_tags(tag_names, match_type)