Module: EchoUploads

Defined in:
lib/echo_uploads/validation.rb,
lib/echo_uploads.rb,
lib/echo_uploads/file.rb,
lib/echo_uploads/model.rb,
lib/echo_uploads/railtie.rb,
lib/echo_uploads/abstract_store.rb,
lib/echo_uploads/filesystem_store.rb,
lib/echo_uploads/perm_file_saving.rb,
lib/echo_uploads/temp_file_saving.rb

Overview

If you want to validate the presence of a file, be sure to use:

validates :attr, uploads: {presence: true}

instead of:

validates :attr, presence: true

The former takes into account files that have already been persisted, whereas the latter does not and will cause false validation errors.

Defined Under Namespace

Modules: Model, PermFileSaving, TempFileSaving, Validation Classes: AbstractStore, File, FilesystemStore, Railtie