This commit is contained in:
Nicolas Bally 2020-06-24 19:09:37 +02:00
parent 672b5584e4
commit fbc7f4206d
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@ class MOdrFileRoulage < ApplicationRecord
belongs_to :m_odr_file
belongs_to :m_event
validates :date, :presence => true
before_validation do
self.nbr_primes = 2

View File

@ -21,7 +21,7 @@
%tr#m_odr_file_row{:id => m_odr_file.id}
%td
=l m_odr_file.created_at, :format => :date if m_odr_file.created_at
=l m_odr_file.buy_at, :format => :date if m_odr_file.buy_at
%td
=link_to ic(:download)+" Télécharger le document", download_admin_m_odr_file_path(m_odr_file, :disposition => "attachment")