Sha256: 081ca3bbe25f305f700db7d2c3be084ce30bd25023ca93b02b86011ebe193862
Contents?: true
Size: 632 Bytes
Versions: 14
Compression:
Stored size: 632 Bytes
Contents
module Flyboy module ApplicationHelper def goal_color(goal) return "onalert" if Flyboy::Task.where('goal_id = ? AND done = ? AND term < ?', goal.id, false, Date.today).count > 0 return "onwarning" if Flyboy::Task.where('goal_id = ? AND done = ? AND term > ? AND reminder < ?', goal.id , false, Date.today, Date.today).count > 0 return "finished" if goal.closed? return "ontime" end def task_color(task) return "finished" if task.done return "ontime" if task.reminder > Date.today return "onalert" if task.term < Date.today return "onwarning" end end end
Version data entries
14 entries across 14 versions & 1 rubygems