Add changed? and compare on ProcedureRevision
This commit is contained in:
parent
15e9013264
commit
0d25f52309
3 changed files with 131 additions and 0 deletions
|
@ -333,6 +333,14 @@ class Procedure < ApplicationRecord
|
|||
publiee? || close? || depubliee?
|
||||
end
|
||||
|
||||
def draft_changed?
|
||||
publiee? && published_revision.changed?(draft_revision)
|
||||
end
|
||||
|
||||
def revision_changes
|
||||
published_revision.compare(draft_revision)
|
||||
end
|
||||
|
||||
def accepts_new_dossiers?
|
||||
publiee? || brouillon?
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue