Add publish_draft feature flag

This commit is contained in:
Paul Chavard 2018-08-13 17:52:56 +02:00
parent a3757758d8
commit 3be678dbe5
2 changed files with 6 additions and 0 deletions

View file

@ -113,6 +113,11 @@ class Procedure < ApplicationRecord
publiee_ou_archivee?
end
# This method is needed for transition. Eventually this will be the same as brouillon?.
def brouillon_avec_lien?
Flipflop.publish_draft? && brouillon? && procedure_path.present?
end
def publiee_ou_archivee?
publiee? || archivee?
end

View file

@ -16,6 +16,7 @@ Flipflop.configure do
end
feature :web_hook
feature :publish_draft
feature :new_dossier_details,
title: "Nouvelle page « Dossier »"