Set published_at on revision when publishing a procedure

This commit is contained in:
Paul Chavard 2021-06-18 11:13:18 +02:00
parent 7cb2f91fea
commit 15e9013264

View file

@ -689,6 +689,11 @@ class Procedure < ApplicationRecord
end
end
def publish_revision!
update!(draft_revision: create_new_revision, published_revision: draft_revision)
published_revision.touch(:published_at)
end
private
def before_publish