Skip to content

Commit 4a89a9d

Browse files
committed
Fix ActiveStorageLoader example
1 parent 57e7150 commit 4a89a9d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/active_storage_loader.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# end
1515

1616
####
17-
# An example data type using the AttachmentLoader
17+
# An example data type using the Loaders::ActiveStorageLoader
1818
####
1919

2020
# class Types::EventType < Types::BaseObject
@@ -25,15 +25,15 @@
2525
# field :pictures, String, null: true
2626
#
2727
# def image
28-
# AttachmentLoader.for(:Event, :image).load(object.id).then do |image|
28+
# Loaders::ActiveStorageLoader.for(:Event, :image).load(object.id).then do |image|
2929
# Rails.application.routes.url_helpers.url_for(
3030
# image.variant({ quality: 75 })
3131
# )
3232
# end
3333
# end
3434
#
3535
# def pictures
36-
# AttachmentLoader.for(:Event, :pictures, association_type: :has_many_attached).load(object.id).then do |pictures|
36+
# Loaders::ActiveStorageLoader.for(:Event, :pictures, association_type: :has_many_attached).load(object.id).then do |pictures|
3737
# pictures.map do |picture|
3838
# Rails.application.routes.url_helpers.url_for(
3939
# picture.variant({ quality: 75 })

0 commit comments

Comments
 (0)