Vote count: 0 I have used this code in helper to display the count based on the status - def to_do_count Task.where(status: 0).count end def in_progress_count Task.where(status: 1).count end def paused_count Task.where(status: 2).count end def completed_count Task.where(status: 3).count end I need help to optimize this code as there are lot of repetitions. asked 25 secs agoAasish Sharma Let's block ads! بخوانید...
ادامه مطلب