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

View file

@ -46,7 +46,7 @@
%div %div
%h3 Lien procédure %h3 Lien procédure
%div{ style: 'margin-left: 3%;' } %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' = link_to @facade.procedure.lien, @facade.procedure.lien, target: '_blank'
- else - else
%b %b