This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user