Notification open rates

<%= number_with_delimiter @clicked_notifications.count %> clicked / <%= number_with_delimiter @notifications.count %> total (<%= @clicked_notifications.count / @notifications.count.to_f * 100 %>%)
<% @codes.each do |code| %>
Reference code: <%= code.inspect %>
<% clicked_notifs = Notification.where(reference_code: code).where.not(viewed_at: nil).count total_notifs = Notification.where(reference_code: code).count %>
<% end %>