Set published_at on revision when publishing a procedure
This commit is contained in:
parent
7cb2f91fea
commit
15e9013264
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue