module

Latch::Avram::SaveOperation

Inherits Latch::Avram::Validations

Macros

attach(name, field_name = nil, process = false, &block)

Registers a file attribute for an existing attachment on the model.

# The field name in the form will be "avatar_file"
attach avatar

# With a custom field name
attach avatar, field_name: "avatar_upload"

The attachment will then be uploaded to the cache store, and after committing to the database the attachment will be moved to the permanent storage.

Source