]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Merge branch 'master' into moderation
[rails.git] / app / models / user.rb
index 1cd8c6d89f439651d5b88f35b04ef2dda887a4a6..2d51b5af56915296825acb9ca33d1437cf1f5ceb 100644 (file)
@@ -73,6 +73,12 @@ class User < ActiveRecord::Base
 
   has_many :roles, :class_name => "UserRole"
 
+  has_many :issues, :class_name => "Issue", :foreign_key => :reported_user_id
+  has_one :issue, :class_name => "Issue", :foreign_key => :updated_by
+  has_many :issue_comments
+
+  has_many :reports
+
   scope :visible, -> { where(:status => %w[pending active confirmed]) }
   scope :active, -> { where(:status => %w[active confirmed]) }
   scope :identifiable, -> { where(:data_public => true) }