diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-12-04 11:55:24 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-12-04 11:55:24 +0000 |
commit | 43e9b5101fc290db2ea1c2a9c3bfc3e11aee0e32 (patch) | |
tree | 27813a2d32a2ae86c7cd479b9b4c885c0108c863 /views/_history.haml | |
parent | 2c843719f0776baa28099d15a58768a6ddefa94f (diff) |
Added "eager" loading when looking at event histories.
Diffstat (limited to 'views/_history.haml')
-rw-r--r-- | views/_history.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/views/_history.haml b/views/_history.haml index 400c1c3..a399113 100644 --- a/views/_history.haml +++ b/views/_history.haml @@ -3,7 +3,7 @@ = history.created_at.strftime("%a %d %b %Y") %p = history.created_at.strftime("%R") - - history.alerts.each do |alert| + - (history.cached_alerts.empty? ? history.alerts : history.cached_alerts).each do |alert| %a{ :href => self.class.url_for(alert) } = alert.id %strong |