Best method to get current user vote type for hundreds posts with Rails?

Here is question on stackoverflow, does anyone can help with?