1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activestorage/test/models
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
..
attached Fix attaching blobs via nested attributes 2020-08-04 00:26:27 -04:00
attachment_test.rb Allow custom purpose for ActiveStorage signed IDs 2020-12-03 12:36:52 -05:00
blob_test.rb Identify directly-uploaded blobs before saving the associated record 2020-08-11 18:08:09 -04:00
filename_test.rb Enable Performance/UnfreezeString cop 2018-09-23 08:56:55 +09:00
presence_validation_test.rb Store newly-uploaded files on save rather than assignment 2018-07-07 23:25:33 -04:00
preview_test.rb Generate a preview without print margins 2020-09-17 11:59:45 -04:00
reflection_test.rb Allow configure services for individual attachments 2019-10-01 21:24:05 +03:00
representation_test.rb Extract Analyzable and Representable concerns 2018-01-10 12:12:04 -05:00
strict_loading_test.rb Add strict loading for active storage 2020-11-16 22:09:15 +08:00
variant_test.rb Remove deprecated support to pass :combine_options operations to ActiveStorage::Transformers::ImageProcessing 2020-10-30 00:25:48 +00:00
variant_with_record_test.rb Make sure variant is created on the same service 2019-12-06 22:02:07 -05:00