add service to create procedure archive
This commit is contained in:
parent
fba0d78153
commit
07cc4fa97f
6 changed files with 182 additions and 1 deletions
|
@ -48,4 +48,12 @@ class Archive < ApplicationRecord
|
|||
def available?
|
||||
status == 'generated' && file.attached?
|
||||
end
|
||||
|
||||
def filename(procedure)
|
||||
if content_type == 'everything'
|
||||
"procedure-#{procedure.id}.zip"
|
||||
else
|
||||
"procedure-#{procedure.id}-mois-#{I18n.l(month, format: '%Y-%m')}.zip"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue