This commit is contained in:
2025-12-30 10:09:13 +09:00
parent 23d6303b49
commit 83fb6ee456
4 changed files with 84 additions and 8 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ class WikiLine < ApplicationRecord
sha = Digest::SHA256.hexdigest(body)
now = Time.current
upsert({ sha256: sha, body:, created_at: now, updated_at: now }, unique_by: :sha256)
upsert({ sha256: sha, body:, created_at: now, updated_at: now })
find_by!(sha256: sha)
end