From 1a806144710c45f701d393b7c798f08faceca2b8 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 13 Oct 2016 04:41:45 +0300 Subject: [PATCH] Fix up most and last class methods --- app/models/conflicts_for_talk.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/conflicts_for_talk.rb b/app/models/conflicts_for_talk.rb index 88e685f..eb62fc0 100644 --- a/app/models/conflicts_for_talk.rb +++ b/app/models/conflicts_for_talk.rb @@ -1,9 +1,9 @@ class ConflictsForTalk < ApplicationRecord def self.most - first + order(conflicts: :desc).first end def self.least - last + order(conflicts: :asc).first end end