created a model for the rating view and it can now be used within any model