Refactored renderRating function.

Changed use in detail.