Sha256: ef93f1cc8608fe2ae4d9f52f518f6c447e69498602d60aff33c079c9add358ef

Contents?: true

Size: 405 Bytes

Versions: 15

Compression:

Stored size: 405 Bytes

Contents

module Dorsale
  module Alexandrie
    class Attachment < ActiveRecord::Base
      self.table_name = "dorsale_alexandrie_attachments"

      belongs_to :attachable, polymorphic: true

      validates :attachable, presence: true
      validates :file,       presence: true

      mount_uploader :file, ::Dorsale::Alexandrie::FileUploader

      def to_s
        file_identifier
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
dorsale-2.1.13 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.12 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.11 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.10 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.9 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.8 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.7 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.6 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.5 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.4 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.3 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.2 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.1 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.1.0 app/models/dorsale/alexandrie/attachment.rb
dorsale-2.0.1 app/models/dorsale/alexandrie/attachment.rb