aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-05-14 15:09:36 +0100
committerGareth Rees <gareth@mysociety.org>2015-06-04 13:51:16 +0100
commit2e1bad6cd7b25cc301e797b3ad13ed540440d7ee (patch)
tree1fcf88236101608f89c7dec68a78e7cf3756bc0e
parent794cae83252a9a739d80acb6533cbf39d5791496 (diff)
Idiomatic ruby
-rw-r--r--app/views/public_body/show.html.erb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb
index eda85b443..bd79449cf 100644
--- a/app/views/public_body/show.html.erb
+++ b/app/views/public_body/show.html.erb
@@ -83,7 +83,7 @@
<div class="authority__body">
<div class="authority__body__foi-results">
- <% if @number_of_visible_requests == 0 %>
+ <% if @number_of_visible_requests.zero? %>
<% if @public_body.is_requestable? or @public_body.not_requestable_reason != 'defunct' %>
<% if @public_body.eir_only? %>
<h2><%= _('Environmental Information Regulations requests made using this site') %></h2>
@@ -106,9 +106,8 @@
<% end %>
<% end %>
- <% if !@xapian_requests.nil? %>
-
- <% for result in @xapian_requests.results %>
+ <% if @xapian_requests %>
+ <% @xapian_requests.results.each do |result| %>
<%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model] } %>
<% end %>