share ERB rendering code in a helper