]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user.rb
Include useful URLs in note responses
[rails.git] / app / models / user.rb
index 68537e749fa5c794bba5ef5f13a49911f563e829..889c40451e45707b2babfadc7c04f8ad1638eb4d 100644 (file)
@@ -12,6 +12,8 @@ class User < ActiveRecord::Base
   has_many :tokens, :class_name => "UserToken"
   has_many :preferences, :class_name => "UserPreference"
   has_many :changesets, :order => 'created_at DESC'
+  has_many :note_comments, :foreign_key => :author_id
+  has_many :notes, :through => :note_comments
 
   has_many :client_applications
   has_many :oauth_tokens, :class_name => "OauthToken", :order => "authorized_at desc", :include => [:client_application]
@@ -198,6 +200,7 @@ class User < ActiveRecord::Base
     self.image = nil
     self.email_valid = false
     self.new_email = nil
+    self.openid_url = nil
     self.status = "deleted"
     self.save
   end