My code is as follows:
ac = ActionController::Base.new()
# do some stuff
ac.render_to_string(
partial: my_partial,
formats: my_format,
locals: { some_local: some_value }
)
What I would like to do is make some helpers dynamically available to the partial that I render. Ideally, I'd like to loop over an array of helper modules and extend the view so that my helper methods are accessible inside the view. Is this possible?
(I know it's not clean code, but this is a very particular low level service)