Browse Source

Merge pull request #105 from lexintegritastech/improve-main-ui

Fix validation for `doctrine`
pull/106/head
Alexander D. Bondoc 4 years ago committed by GitHub
parent
commit
2d89915690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      app/models/doctrine.rb

3
app/models/doctrine.rb

@ -9,8 +9,7 @@ class Doctrine < ApplicationRecord
has_many :annotations, dependent: :destroy
validates :content, presence: true
validates :content_fingerprint, uniqueness: true
validates :content, :headnote, presence: true
before_validation do
self.content_fingerprint = Digest::SHA256.hexdigest(content)

Loading…
Cancel
Save