Module: Dorsale::Flyboy::TasksSummaryConcern

Extended by:
ActiveSupport::Concern
Included in:
TasksController
Defined in:
app/controllers/dorsale/flyboy/concerns/tasks_summary.rb

Instance Method Summary collapse

Instance Method Details

#setup_tasks_summaryObject



6
7
8
9
10
11
12
13
# File 'app/controllers/dorsale/flyboy/concerns/tasks_summary.rb', line 6

def setup_tasks_summary
  tasks = current_user_scope.tasks.where("(owner_id is null and owner_type is null) or (owner_id = ? and owner_type = ?)", current_user.id, current_user.class.name)
  @delayed_tasks   = tasks.delayed
  @today_tasks     = tasks.today
  @tomorrow_tasks  = tasks.tomorrow
  @this_week_tasks = tasks.this_week
  @next_week_tasks = tasks.next_week
end