gauge/app/models/ratings.rb
2016-10-06 20:30:28 +03:00

10 lines
138 B
Ruby

class Ratings
def initialize
@ratings = {}
end
def [](id)
@ratings[id] ||= SelectedTalk.where(talk_id: id).count
end
end