gauge/app/models/conference_summary.rb

18 lines
375 B
Ruby
Raw Normal View History

2016-10-10 20:20:56 +03:00
class ConferenceSummary
def initialize(params = {})
@talk_ids = params[:talk_ids]
end
def number_of_ballots
TalkPreference.joins(:selected_talks)
.where(selected_talks: {
talk_id: @talk_ids
})
.uniq.count
end
def ratings
end
end