From 8cc6229606ae5f623eaec57c7b87029222969d19 Mon Sep 17 00:00:00 2001 From: Xavier J Date: Fri, 25 Nov 2016 12:07:01 +0100 Subject: [PATCH 1/2] Change max-size for CERFA and PJ --- app/models/cerfa.rb | 2 +- app/models/piece_justificative.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/cerfa.rb b/app/models/cerfa.rb index c9ea2786d..0022ad244 100644 --- a/app/models/cerfa.rb +++ b/app/models/cerfa.rb @@ -3,7 +3,7 @@ class Cerfa < ActiveRecord::Base belongs_to :user mount_uploader :content, CerfaUploader - validates :content, :file_size => {:maximum => 6.megabytes} + validates :content, :file_size => {:maximum => 20.megabytes} def empty? content.blank? diff --git a/app/models/piece_justificative.rb b/app/models/piece_justificative.rb index 9408e4899..e1a0df9c8 100644 --- a/app/models/piece_justificative.rb +++ b/app/models/piece_justificative.rb @@ -10,7 +10,7 @@ class PieceJustificative < ActiveRecord::Base alias_attribute :type, :type_de_piece_justificative_id mount_uploader :content, PieceJustificativeUploader - validates :content, :file_size => {:maximum => 6.megabytes} + validates :content, :file_size => {:maximum => 20.megabytes} validates :content, presence: true, allow_blank: false, allow_nil: false def empty? From f4078124a4cceef08c6f91adae43e2ca096b950c Mon Sep 17 00:00:00 2001 From: Xavier J Date: Fri, 25 Nov 2016 12:20:44 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Change=20local=20libell=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/fr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/fr.yml b/config/locales/fr.yml index bb400f609..5e2a85d91 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -44,11 +44,11 @@ fr: piece_justificative: attributes: content: - size_too_big: "La taille du fichier joint est trop importante. Elle doit être inférieure à 6Mo." + size_too_big: "La taille du fichier joint est trop importante. Elle doit être inférieure à 20Mo." cerfa: attributes: content: - size_too_big: "La taille du fichier joint est trop importante. Elle doit être inférieure à 6Mo." + size_too_big: "La taille du fichier joint est trop importante. Elle doit être inférieure à 20Mo." user: attributes: reset_password_token: