]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Fixed tests + Added new ones
[rails.git] / app / models / user.rb
index a550b9f05fd2a8ddd891b9dd134e58a04898d88a..866074766e462c176c2c18a4b5814c1a9aba81b3 100644 (file)
@@ -26,6 +26,11 @@ class User < ActiveRecord::Base
 
   has_many :roles, :class_name => "UserRole"
 
+  has_many :issues, :class_name => "Issue", :foreign_key => :reported_user_id
+  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) }