Class: DownloadToken

Inherits:
ApplicationRecord show all
Defined in:
app/models/download_token.rb

Overview

== Schema Information

Table name: download_tokens
Database name: primary

id :integer not null, primary key
expires_at :datetime not null
token :string not null
upload_id :integer not null

Indexes

index_download_tokens_on_token (token) UNIQUE
index_download_tokens_on_upload_id (upload_id)

Foreign Keys

fk_rails_... (upload_id => uploads.id) ON DELETE => cascade

Belongs to collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Instance Method Details

#uploadUpload

, presence: true, optional: true

Returns:

See Also:



24
# File 'app/models/download_token.rb', line 24

belongs_to :upload