Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Likeable has some where calls #3

Closed
bemurphy opened this issue Nov 12, 2011 · 1 comment
Closed

Likeable has some where calls #3

bemurphy opened this issue Nov 12, 2011 · 1 comment

Comments

@bemurphy
Copy link
Collaborator

Likeable has 2 calls to where finders. It should probably rely on the find_one/find_many procs.

Also, .all_liked_by_ids is mapping using .to_i:

def all_liked_ids_by(user)
  key = user.like_key(self.to_s.downcase)
  ids = (Likeable.redis.hkeys(key)||[]).map(&:to_i)
end

when .to_s would probably work and then allow it to support hash ids like Mongoid uses.

I might hack on this if I get time later.

@schneems
Copy link
Owner

closing this out in favor of your pull request, i'll get a good chance to go over it on monday, thanks for the interest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants