X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4b0191befd6ba3010b9d220a5deabf85254038ff..d2cf09f389b2b92aa2bc55f375573173a2bcf1a4:/app/models/map_bug_comment.rb diff --git a/app/models/map_bug_comment.rb b/app/models/map_bug_comment.rb index 3b95b1fff..50bfe3bef 100644 --- a/app/models/map_bug_comment.rb +++ b/app/models/map_bug_comment.rb @@ -9,4 +9,12 @@ class MapBugComment < ActiveRecord::Base validates_uniqueness_of :id validates_presence_of :visible validates_presence_of :date_created + + def commenter_name + if self.commenter_id.nil? + self.read_attribute(:commenter_name) + else + self.user.display_name + end + end end