Remove Procedure#published?

This commit is contained in:
gregoirenovel 2017-07-13 15:18:46 +02:00
parent 36bee67085
commit 2b7a148540
2 changed files with 2 additions and 6 deletions

View file

@ -94,7 +94,7 @@ class Procedure < ActiveRecord::Base
end
def locked?
published?
publiee? || archivee?
end
def clone
@ -129,10 +129,6 @@ class Procedure < ActiveRecord::Base
ProcedurePath.create!(path: path, procedure: self, administrateur: self.administrateur)
end
def published?
published_at.present?
end
def publiee?
published_at.present? && archived_at.nil?
end

View file

@ -46,7 +46,7 @@
%div
%h3 Lien procédure
%div{ style: 'margin-left: 3%;' }
- if @facade.procedure.published?
- if @facade.procedure.publiee? || @facade.procedure.archivee?
= link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank'
- else
%b