This is better to be left as it is as it has 3 lines of common code and I find it quite complex to put it in partial.