Use reports_count so that counter_cache works automatically.
[rails.git] / app / models / report.rb
1 class Report < ActiveRecord::Base
2   belongs_to :issue, :counter_cache => true
3   belongs_to :user, :class_name => "User", :foreign_key => :reporter_user_id
4 end