be more selective about invoking array-of-strings display on generic object#show...
authorTom Clegg <tom@clinicalfuture.com>
Sun, 10 Feb 2013 17:16:10 +0000 (12:16 -0500)
committerTom Clegg <tom@clinicalfuture.com>
Sun, 10 Feb 2013 17:16:10 +0000 (12:16 -0500)
app/views/application/_orvos_object_attr.html.erb

index 9ab7e9f0180e71ab03703920b3a428db9e29ee43..1351c0b7429764f9d8f4ac2491d5bf6c81b6deb7 100644 (file)
@@ -3,7 +3,7 @@
   <td><%= attr %>[<%= infokey %>]</td>
   <td>
     <tt>
-      <% if infocontent.is_a? Array then infocontent.each do |message| %>
+      <% if infocontent.is_a? Array and infocontent.collect(&:class).uniq.compact == [String] then infocontent.each do |message| %>
       <%= message %><br />
       <% end; elsif infocontent.is_a? String %>
       <%= infocontent %>