Project

General

Profile

« Previous | Next » 

Revision d2175aa0

Added by Ondřej Ezr about 4 years ago

Fixes #29523 - GraphQL collection preloading on Rails 6

View differences:

config/initializers/z_rails_5_compatibility.rb
super(template, source)
end
end
module CollectionLoaderAssocRead
def read_association(_preloader, record)
record.public_send(association_name)
end
end
end
end
ActionView::Template::Handlers::Rabl.singleton_class.prepend Foreman::Rails5::RablTemplateHandlerExt
if Rails.version.start_with?('5.2')
CollectionLoader.prepend Foreman::Rails5::CollectionLoaderAssocRead
end

Also available in: Unified diff