The link is public but protected by a secure token. This extends the activesupport Attachment model to automatically generate a token
7 lines
206 B
Ruby
7 lines
206 B
Ruby
class AddTokenToAttachments < ActiveRecord::Migration[6.0]
|
|
def change
|
|
add_column :active_storage_attachments, :token, :string
|
|
add_index :active_storage_attachments, :token, unique: true
|
|
end
|
|
end
|