1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activestorage/app
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
..
assets/javascripts Add gitattributes for vendored and generated files [ci-skip] 2020-10-04 16:44:37 -05:00
controllers Permit hash on direct upload in active storage (#40662) 2020-11-28 10:33:44 +01:00
javascript/activestorage Defaults content_type to application/octet-stream 2020-01-07 10:30:56 -08:00
jobs/active_storage
models/active_storage Allow custom purpose for ActiveStorage signed IDs 2020-12-03 12:36:52 -05:00