Use reports_count so that counter_cache works automatically.
This commit is contained in:
parent
b578cee759
commit
948fd8c8fa
3 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
class Report < ActiveRecord::Base
|
||||
belongs_to :issue
|
||||
belongs_to :issue, :counter_cache => true
|
||||
belongs_to :user, :class_name => "User", :foreign_key => :reporter_user_id
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue