The pull request with all the code.

This should probably be solved by a relationship:
user `has_many :ratings` and then on the ratings model you would have `belongs_to :user`, you would have to add a `user_id` column to your ratings table, but that's it... then you would be able to do something like this in the controller:
`@ratings = current_user.ratings`
or even just use `current_user.ratings` in your view.