Commit 5253ff98473250e97f6f7cb19e015c23587ac08e
1 parent
ebe6df82
Exists in
master
and in
1 other branch
make sure that adding new ideas increases the idea counter cache
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/choice.rb
1 | class Choice < ActiveRecord::Base | 1 | class Choice < ActiveRecord::Base |
2 | include Activation | 2 | include Activation |
3 | 3 | ||
4 | - belongs_to :question | 4 | + belongs_to :question, :counter_cache => true |
5 | belongs_to :item | 5 | belongs_to :item |
6 | belongs_to :creator, :class_name => "Visitor", :foreign_key => "creator_id" | 6 | belongs_to :creator, :class_name => "Visitor", :foreign_key => "creator_id" |
7 | 7 |