X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/13c2ac5cdb7e5beddf80b90b0357b9961e12033f..965f32d545d7c44ad7b36264b818b930a50d8901:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index a550b9f05..866074766 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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) }