aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony <tony>2009-03-09 06:54:55 +0000
committertony <tony>2009-03-09 06:54:55 +0000
commitc3f283eb7d4c2daa7bf1340e87668d8738508911 (patch)
tree93885e97bb34ce5d45af9c84983abeee6187bb63
parent293d03b1bb463b248537fcc49cf85ed1c3601703 (diff)
Explicitly sort old versions by id (versions() doesn't seem to always
order correctly. See BBC for example)
-rw-r--r--app/views/admin_public_body/show.rhtml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.rhtml
index 363586fb3..b33278dda 100644
--- a/app/views/admin_public_body/show.rhtml
+++ b/app/views/admin_public_body/show.rhtml
@@ -47,7 +47,7 @@
<% end %>
<th>Updated at</th>
</tr>
-<% for historic_public_body in @public_body.versions.reverse %>
+<% for historic_public_body in @public_body.versions.sort { |a,b| b.id <=> a.id } %>
<tr class="<%= cycle('odd', 'even') %>">
<% for column in history_columns %>
<%