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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user