X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/30756f72ca2e3db095d00bc3b90bb3e47ca4ab6f..b16aa11f65ed1120ee546712150ad6f57ec50102:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index 036f2fdc4..aaa00169f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -75,6 +75,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) }