Code review: cleanup code

This commit is contained in:
Guillaume Lazzara 2016-02-19 14:12:06 +01:00
parent 15ac9f3f45
commit 22c1eca61e
3 changed files with 4 additions and 5 deletions

View file

@ -2,7 +2,7 @@ class Cerfa < ActiveRecord::Base
belongs_to :dossier
mount_uploader :content, CerfaUploader
validates :content, :file_size => { :maximum => 3.megabytes.to_i }
validates :content, :file_size => { :maximum => 3.megabytes }
def empty?
content.blank?

View file

@ -7,7 +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 }
validates :content, :file_size => { :maximum => 3.megabytes }
def empty?
content.blank?