Maybe the condition could be on ```if template.end_with?("/")```, it makes more sense this way to me