aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony <tony>2009-03-09 07:02:06 +0000
committertony <tony>2009-03-09 07:02:06 +0000
commit6ea34a188ea4f0bb786e2be9bc002d91d36e9764 (patch)
treedfd77eb02311a34a8de7d5edeaa75524622a3705
parentc3f283eb7d4c2daa7bf1340e87668d8738508911 (diff)
Ordering by version is better than by id.
-rw-r--r--app/views/admin_public_body/show.rhtml3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.rhtml
index b33278dda..11c913196 100644
--- a/app/views/admin_public_body/show.rhtml
+++ b/app/views/admin_public_body/show.rhtml
@@ -47,7 +47,8 @@
<% end %>
<th>Updated at</th>
</tr>
-<% for historic_public_body in @public_body.versions.sort { |a,b| b.id <=> a.id } %>
+<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %>
+<% for historic_public_body in @public_body.versions.sort { |a,b| b.version <=> a.version } %>
<tr class="<%= cycle('odd', 'even') %>">
<% for column in history_columns %>
<%