rails/activestorage/test
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
..
analyzer Fall back to video container for duration 2020-08-31 08:48:06 -04:00
controllers Permit hash on direct upload in active storage (#40662) 2020-11-28 10:33:44 +01:00
database touch parent model when an attachment is purged 2020-07-26 12:22:37 -05:00
dummy Always recommend config.asset_host in examples 2020-11-30 16:33:51 -06:00
fixtures/files Generate a preview without print margins 2020-09-17 11:59:45 -04:00
jobs Correct test class name 2019-09-28 10:31:26 -04:00
models Allow custom purpose for ActiveStorage signed IDs 2020-12-03 12:36:52 -05:00
previewer Generate a preview without print margins 2020-09-17 11:59:45 -04:00
service Prefix keys in Active Storage service test 2020-10-07 21:47:59 +01:00
template url -> URL where apt except inside actionpack/ 2019-04-01 22:56:35 +05:30
javascript_package_test.rb Enforce that activestorage compiled JS is in sync with source code 2019-10-18 18:02:02 -07:00
test_helper.rb Fix backtraces for generated plugin tests 2020-10-07 15:40:56 -05:00