Sha256: 6ec0b0ffb7862cf2ef5fe05c847ca381d02846e0a8b484078cd5f1961793cac4

Contents?: true

Size: 556 Bytes

Versions: 6

Compression:

Stored size: 556 Bytes

Contents

module Gaku
  class Template < ActiveRecord::Base

    has_attached_file :file

    validates :name, :context, presence: true
    validates :file, presence: true, on: :create

    validates_attachment_content_type :file,
                                      message: I18n.t(:'template.file_type_error'),
      content_type:
        [
          'text/plain',
          'application/vnd.ms-excel',
          'application/vnd.oasis.opendocument.spreadsheet',
          'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
        ]

  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
gaku_core-0.0.3 app/models/gaku/template.rb
gaku-0.0.3 core/app/models/gaku/template.rb
gaku-0.0.2 core/app/models/gaku/template.rb
gaku_core-0.0.2 app/models/gaku/template.rb
gaku-0.0.1 core/app/models/gaku/template.rb
gaku_core-0.0.1 app/models/gaku/template.rb