Handle upload file size limit in UI
This commit is contained in:
parent
534e041e1b
commit
a643f34621
7 changed files with 90 additions and 9 deletions
|
@ -7,6 +7,7 @@ class PieceJustificative < ActiveRecord::Base
|
|||
alias_attribute :type, :type_de_piece_justificative_id
|
||||
|
||||
mount_uploader :content, PieceJustificativeUploader
|
||||
validates :content, :file_size => { :maximum => 3.megabytes.to_i }
|
||||
|
||||
def empty?
|
||||
content.blank?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue