]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Added sortable headers + search + reportable Notes
[rails.git] / app / models / user.rb
index a550b9f05fd2a8ddd891b9dd134e58a04898d88a..1c38ea1ccdac3708f336381c77c0ce4414179f04 100644 (file)
@@ -26,6 +26,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) }