Liking multiple items
Is there an efficient way to like multiple items together? i.e. I am currently doing:
movies.each { |m| user.like(m) }
but of course there are lots of inefficiencies.
Not currently. I'd probably accept a PR to make the rating methods take a splatted list of items, though then handling the before/after hooks may end up getting tricky.
Fortunately I don't have after hooks though I agree that would make a generic solution tricky. The biggest problem would be triggering before/after blocks without triggering the before after But there a lot of requests to Redis could be pipelined and multiple calls to sadd and zadd could be coalesced in a few places. We'll have to watch performance and if it is warranted look into that PR.
Sounds good! Please let me know what you find!