]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Made rubocop happy by formatting and minor syntax tweaks.
[rails.git] / app / models / user.rb
index a550b9f05fd2a8ddd891b9dd134e58a04898d88a..6fbf8eecbb31573121d0209cece0112edbc3cb7a 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) }