Sha256: cd1c2a3d04d92cda85c9fd3be99cd2d7bf5a6156774a7cad5896ef54c403b3f2
Contents?: true
Size: 558 Bytes
Versions: 16
Compression:
Stored size: 558 Bytes
Contents
module Gaku class Template < ActiveRecord::Base has_attached_file :file validates_with AttachmentContentTypeValidator, attributes: :file, content_type: ['text/plain', 'application/vnd.ms-excel', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'], message: I18n.t(:'template.file_type_error') validates :name, :context, presence: true validates :file, presence: true, on: :create end end
Version data entries
16 entries across 16 versions & 2 rubygems