Fix i18n translations warnings.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-24 11:36:45 +02:00
parent 63621aa526
commit 17ad148cd7
4 changed files with 8 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ class Document < ActiveRecord::Base
def validate_attachment_content_type
if documentable.present? &&
!documentable.class.accepted_content_types.include?(attachment_content_type)
errors[:attachment] = I18n.t("documents.errors.messages.content_type",
errors[:attachment] = I18n.t("documents.errors.messages.wrong_content_type",
content_type: attachment_content_type,
accepted_content_types: documentable.class.accepted_content_types.join(", "))
end