aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-01-09 10:05:27 +0000
committerSeb Bacon <seb.bacon@gmail.com>2012-01-09 10:05:27 +0000
commitcf60b287890534fd5daf54639ace20c066b13d2a (patch)
tree959fb2ed225608012166f9ae0b0e18c7ddb38a20
parent800841e5ada3e99f6de453ec9c8e5d1f312e2ef5 (diff)
parent848483381694e67999e446d3784b0c32dfdc3f8d (diff)
Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5
-rw-r--r--app/views/admin_general/timeline.rhtml10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/views/admin_general/timeline.rhtml b/app/views/admin_general/timeline.rhtml
index dc72e46cd..39a4b3e36 100644
--- a/app/views/admin_general/timeline.rhtml
+++ b/app/views/admin_general/timeline.rhtml
@@ -36,10 +36,9 @@
end
%>
<% elsif event.event_type == 'edit_outgoing' %>
- <% outgoing_messages = OutgoingMessage.find(:all, event.params[:outgoing_message_id].to_i) %>
+ <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %>
had outgoing message edited by administrator <strong><%=h event.params[:editor] %></strong>.
- <% if outgoing_messages.size > 0 %>
- <% outgoing_message = outgoing_messages[0] %>
+ <% if outgoing_message %>
<% for p in ['body']
if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
%> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%
@@ -50,10 +49,9 @@
Missing outgoing message, internal error.
<% end %>
<% elsif event.event_type == 'edit_comment' %>
- <% comments = Comment.find(:all, event.params[:comment_id].to_i) %>
+ <% comment = Comment.find(event.params[:comment_id].to_i) %>
had annotation edited by administrator <strong><%=h event.params[:editor] %></strong>.
- <% if comments.size > 0 %>
- <% comment = comments[0] %>
+ <% if comment %>
<% for p in ['body']
if event.params[p.to_sym] != event.params[('old_'+p).to_sym]
%> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <%