Sha256: 88d254c03c58b74c11bb5386e08eb366c0891185a59a0f433abeb39107f44bb3
Contents?: true
Size: 625 Bytes
Versions: 1
Compression:
Stored size: 625 Bytes
Contents
module Flyboy module ApplicationHelper def goal_color(goal) return "onalert" if Flyboy::Task.where(taskable: goal).where('done = ? AND term < ?', false, Date.today).count > 0 return "onwarning" if Flyboy::Task.where(taskable: goal).where('done = ? AND term > ? AND reminder < ?', 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flyboy-1.1.0 | app/helpers/flyboy/application_helper.rb |