rails how to use helpers with ERB.new in service?
问题 I have a service that uses an ERB file to render a template form. In the form I use several helpers, but they don't seem to be available in this context. how could I use my helpers in the rendering via ERB.new(template).result(binding) ? this is the error I'm getting: *** NoMethodError Exception: undefined method `image_encoded' for #<MyService> here's the call in the service app/services/my_service.rb file: ERB.new(template).result(binding) here's my helper app/helpers/my_helper.rb : module