app/views/alerts/index.html.haml
- content_for :head do
= stylesheet_link_tag 'alerts'
%ul.alerts
- @alerts.each do |alert|
- alert[:data].map { |ds, t| [ eval(ds).with_indifferent_access, Time.at(t.to_i) ] }.each do |data, time|
%li
.when== #{time_ago_in_words(time)} ago
.type= alert[:type]
.data= alert_data_to_html_for_type(alert[:type], data)