adds ballot_lines counter to investments

This commit is contained in:
Juanjo Bazán
2017-04-28 13:19:43 +02:00
parent 7e6077e152
commit a4bfe9c50c
3 changed files with 8 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ class Budget
class Ballot
class Line < ActiveRecord::Base
belongs_to :ballot
belongs_to :investment
belongs_to :investment, counter_cache: :ballot_lines_count
belongs_to :heading
belongs_to :group
belongs_to :budget