title: Any tips for displaying user dependent values in a list of items?
body: <p>It is pretty common for a web application to display a list of items and for each item in the list to indicate to the current user whether they have already viewed the associated item.</p>
  
  <p>An approach that I have taken in the past is to store HasViewed objects that contain the Id of a viewed item/object and the Id of the User who has viewed that item/object.</p>
  
  <p>When it comes time to display a list of items this requires querying the database for the items, and separately querying the database for the HasViewed objects, and then combining the results of these queries into a set of objects constructed solely for the purpose of displaying them in the view.</p>
  
  <p>Each e.g li then uses the e.g. has_viewed property of the objects constructed above.</p>
  
  <p>I think it is time to find a better approach and would like to know what approaches you would recommend.</p>