Add total Investments in the execution list

This commit is contained in:
María Checa
2018-07-24 19:42:19 +02:00
committed by Javi Martín
parent d089cc14a5
commit b6fdf732f2
6 changed files with 44 additions and 12 deletions

View File

@@ -84,6 +84,7 @@ class Budget
scope :last_week, -> { where("created_at >= ?", 7.days.ago)}
scope :sort_by_flags, -> { order(flags_count: :desc, updated_at: :desc) }
scope :sort_by_created_at, -> { reorder(created_at: :desc) }
scope :with_milestones, -> { joins(:milestones).distinct }
scope :by_budget, ->(budget) { where(budget: budget) }
scope :by_group, ->(group_id) { where(group_id: group_id) }