Merge branch '113524121-legal_doc_min_size' into staging

This commit is contained in:
Vladimir Krylov 2016-03-11 15:41:48 +02:00
commit 57673bd79d

View file

@ -10,7 +10,7 @@ class LegalDocument < ActiveRecord::Base
belongs_to :documentable, polymorphic: true
validates :body, length: { minimum: (1.37 * 8.kilobytes).ceil }, unless: :path
validates :body, length: { minimum: (1.37 * 8.kilobytes).ceil }, if: ->(file){ file.path.blank? && !Rails.env.staging?}
before_create :add_creator
before_save :save_to_filesystem, if: :body