How can I render a partial to a String in Ruby on Rails 4.2, since render_to_string
is deprecated?
Something like:
rendered_string = render_to_string partial: 'forgotten_orders/soonest_manufacturing_date', locals: { forgotten_order: forgotten_order, soonest_manufacturing_date: soonest_manufacturing_date }
#render
does work in a helper, but this answer doesn't show a helper method! – Giacopo