[Fix #236] Add application/octet-stream content type for tar.bz2 product attachment

This commit is contained in:
Vladimir Sharshov 2012-02-29 13:41:42 +04:00
parent 952082f7a0
commit 97c9eab3be
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ class Product < ActiveRecord::Base
has_attached_file :tar
validates_attachment_content_type :tar, :content_type => ["application/gnutar", "application/x-compressed", "application/x-gzip", "application/x-bzip", "application/x-bzip2", "application/x-tar"], :message => I18n.t('layout.invalid_content_type')
validates_attachment_content_type :tar, :content_type => ["application/gnutar", "application/x-compressed", "application/x-gzip", "application/x-bzip", "application/x-bzip2", "application/x-tar", "application/octet-stream"], :message => I18n.t('layout.invalid_content_type')
validates :name, :presence => true, :uniqueness => {:scope => :platform_id}
scope :recent, order("name ASC")