rails/activestorage/app/models/active_storage
Daniel Colson 8ef5bd9ced
Allow custom purpose for ActiveStorage signed IDs
This commit allows passing a custom `purpose:` keyword argument to both
`find_signed!` and `signed_id`. This matches the signature of the
`super` methods in ActiveRecord, and it is already possible with the
non-bang [`find_signed`][find_signed] method, since that one doesn't
have an override in ActiveStorage (although perhaps it should, to set
the default :blob_id purpose)

This is useful in cases where you want to further isolate different
types of blobs, for example if they have different levels of
authorization.

[find_signed]: be11d1b6e8/activerecord/lib/active_record/signed_id.rb (L42-L48)
2020-12-03 12:36:52 -05:00
..
blob Add requires for mimemagic 2020-09-25 15:00:04 -04:00
attachment.rb Extract ActiveStorage::Record 2020-09-29 11:59:14 -04:00
blob.rb Allow custom purpose for ActiveStorage signed IDs 2020-12-03 12:36:52 -05:00
current.rb Use a current model to provide the host for service urls 2018-04-06 20:07:52 +01:00
filename.rb Encode Content-Disposition filenames on send_data and send_file 2018-09-13 21:38:46 +09:00
preview.rb Active Storage: allow serving files by proxying 2020-05-11 16:21:58 -04:00
record.rb Extract ActiveStorage::Record 2020-09-29 11:59:14 -04:00
variant.rb Remove unused require 2020-09-23 14:39:52 -04:00
variant_record.rb Extract ActiveStorage::Record 2020-09-29 11:59:14 -04:00
variant_with_record.rb Set default variant format from blob content type 2020-09-22 13:03:53 -04:00
variation.rb Remove deprecated ActiveStorage::Transformers::MiniMagickTransformer 2020-10-30 00:25:47 +00:00