Remove unused code

This commit is contained in:
Senén Rodero Rodríguez
2017-08-25 19:14:15 +02:00
parent b0e4c5d66c
commit 57930df535
2 changed files with 1 additions and 13 deletions

View File

@@ -7,12 +7,10 @@ class Document < ActiveRecord::Base
belongs_to :user
belongs_to :documentable, polymorphic: true
# validates_attachment :attachment, presence: true
validate :attachment_presence
# validates :attachment_prensence
# Disable paperclip security validation due to polymorphic configuration
# Paperclip do not allow to user Procs on valiations definition
do_not_validate_attachment_file_type :attachment
validate :attachment_presence
validate :validate_attachment_content_type, if: -> { attachment.present? }
validate :validate_attachment_size, if: -> { attachment.present? }
validates :title, presence: true