# File app/models/period.rb, line 44 def active?(check_tasks = false) start_on <= Date.today && (end_on >= Date.today || (check_tasks && tasks.select {|task| task.active?}.size > 0)) end