Method: Recommendable::Ratable::Likable#liked_by_ids

Defined in:
lib/recommendable/ratable/likable.rb

#liked_by_idsArray

Get the IDs of users that have liked this item.

Returns:

  • (Array)

    the IDs of users that have liked this item



21
22
23
# File 'lib/recommendable/ratable/likable.rb', line 21

def liked_by_ids
  Recommendable.redis.smembers(Recommendable::Helpers::RedisKeyMapper.liked_by_set_for(self.class, id))
end