]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/segment.rb
Showing all messages in inbox, but sorting by date DESC and highlighting new ones...
[rails.git] / app / models / segment.rb
index aa4e07887cca2751301954848029dd9be60ead18..bdb807d9399991cb7faa9ec70898ecccff767345 100644 (file)
@@ -88,7 +88,7 @@ class Segment < ActiveRecord::Base
 
     user_display_name_cache = {} if user_display_name_cache.nil?
 
-    if user_display_name_cache and user_display_name_cache[self.user_id]
+    if user_display_name_cache and user_display_name_cache.key?(self.user_id)
       # use the cache if available
     elsif self.user.data_public?
       user_display_name_cache[self.user_id] = self.user.display_name