can this Ruby block be put into a helper? Would be nice to get this out of the view.