Sha256: 73fb1ebd7ca5f166f5166c2759972b032b2f873fd7d41d183fbc3ee2b81071bd

Contents?: true

Size: 452 Bytes

Versions: 5

Compression:

Stored size: 452 Bytes

Contents

require 'file_size_validator'

module Fae
  class File < ActiveRecord::Base

    include Fae::BaseModelConcern
    include Fae::FileConcern
    include Fae::AssetsValidatable

    mount_uploader :asset, Fae::FileUploader

    validates :asset,
      file_size: {
        maximum: Fae.max_file_upload_size.megabytes.to_i
      }

    belongs_to :fileable, polymorphic: true, touch: true, optional: true

    def readonly?
      false
    end

  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
fae-rails-3.0.0 app/models/fae/file.rb
fae-rails-2.2.0 app/models/fae/file.rb
fae-rails-2.1.0 app/models/fae/file.rb
fae-railsz-2.1.0 app/models/fae/file.rb
fae-rails-2.0.0 app/models/fae/file.rb