File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 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
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 })
You can’t perform that action at this time.
0 commit comments