更新时间:2023-11-28 11:07:40
解决方案:
Rails.application.routes.url_helpers.rails_representation_url(picture_of_car.variant(resize: "300x300").processed, only_path: true)
在此处提供了答案.
对于一个变体,您需要使用 rails_representation_url(variant) - 这将构建一个类似于 rails_blob_url 构建的 URL,但专门针对该变体.
for a variant you need to use rails_representation_url(variant) - this will build a url similar to the one that rails_blob_url builds but specifically for that variant.