fix redefinition of signed_id
Rails method by supporting options as arg
This commit is contained in:
parent
00e640a21d
commit
388ccca263
1 changed files with 2 additions and 2 deletions
|
@ -5,8 +5,8 @@ module BlobSignedIdConcern
|
||||||
# We override signed_id to add `expires_in` option to generated hash.
|
# We override signed_id to add `expires_in` option to generated hash.
|
||||||
# This is a measure to ensure that we never under any circumstance
|
# This is a measure to ensure that we never under any circumstance
|
||||||
# expose permanent attachment url
|
# expose permanent attachment url
|
||||||
def signed_id
|
def signed_id(**options)
|
||||||
ActiveStorage.verifier.generate(id, purpose: :blob_id, expires_in: Rails.application.config.active_storage.service_urls_expire_in)
|
ActiveStorage.verifier.generate(id, **options, purpose: :blob_id, expires_in: Rails.application.config.active_storage.service_urls_expire_in)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue