このコミットが含まれているのは:
@@ -2,7 +2,7 @@ class GekanatorPostsController < ApplicationController
|
||||
def index
|
||||
posts =
|
||||
Post
|
||||
.preload(tags: :tag_name)
|
||||
.preload(:post_similarities, tags: :tag_name)
|
||||
.with_attached_thumbnail
|
||||
.order(Arel.sql(
|
||||
'COALESCE(posts.original_created_before - INTERVAL 1 MINUTE, ' \
|
||||
@@ -22,6 +22,12 @@ class GekanatorPostsController < ApplicationController
|
||||
thumbnail_base: post.thumbnail_base,
|
||||
original_created_from: post.original_created_from,
|
||||
original_created_before: post.original_created_before,
|
||||
post_similarity_edges: post.post_similarities.map { |similarity|
|
||||
{
|
||||
target_post_id: similarity.target_post_id,
|
||||
cos: similarity.cos.to_f
|
||||
}
|
||||
},
|
||||
tags: post.tags.map { |tag| tag_json(tag) }
|
||||
}
|
||||
end
|
||||
|
||||
新しい課題から参照
ユーザをブロックする