Added possibility to overwrite legal document types #2607

This commit is contained in:
Priit Tark 2015-06-02 11:50:41 +03:00
parent 5c12362a7d
commit 83e40b402e
3 changed files with 12 additions and 1 deletions

View file

@ -2,7 +2,11 @@ class LegalDocument < ActiveRecord::Base
include Versions # version/legal_document_version.rb
belongs_to :documentable, polymorphic: true
TYPES = %w(pdf bdoc ddoc zip rar gz tar 7z odt doc docx)
if ENV['legal_document_types'].present?
TYPES = ENV['legal_document_types'].split(',').map(&:strip)
else
TYPES = %w(pdf bdoc ddoc zip rar gz tar 7z odt doc docx)
end
attr_accessor :body