Skip to content

Commit 42f1411

Browse files
authored
Merge pull request #312 from openstax/storage_proxy
Use rails_storage_proxy_url directly
2 parents 44ca265 + fc59409 commit 42f1411

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/has_attachments.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def has_attachments(options={})
3333
getter: ->(*) {
3434
self.images.map do |i|
3535
i.as_json(only: [:created_at], methods: [:signed_id]).merge(
36-
'url' => Rails.application.routes.url_helpers.rails_blob_url(i, {
36+
'url' => Rails.application.routes.url_helpers.rails_storage_proxy_url(i, {
3737
host: Rails.application.secrets.attachments_url
3838
})
3939
)

spec/representers/api/v1/exercises/representer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module Api::V1::Exercises
9797
including(
9898
'images' => [a_hash_including(
9999
'url' => a_string_matching(
100-
Rails.application.routes.url_helpers.rails_blob_url(
100+
Rails.application.routes.url_helpers.rails_storage_proxy_url(
101101
exercise.images.first, {
102102
host: Rails.application.secrets.attachments_url
103103
})

0 commit comments

Comments
 (0)