erb templ var refactoring