2015-10-06 21:37:53 +03:00
|
|
|
class Ratings
|
|
|
|
def initialize
|
2016-10-06 20:30:28 +03:00
|
|
|
@ratings = {}
|
2015-10-06 21:37:53 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
def [](id)
|
2016-10-06 20:30:28 +03:00
|
|
|
@ratings[id] ||= SelectedTalk.where(talk_id: id).count
|
2015-10-06 21:37:53 +03:00
|
|
|
end
|
|
|
|
end
|