ehmorris/keepsakes

View on GitHub
app/views/days/_texts.haml

Summary

Maintainability
Test Coverage
.meta.texts
  .gallery
    - if @texts
      - @texts.group_by(&:contacts).each do |contacts, texts|
        %ol.item
          %p.contacts= contacts
          - texts.each do |t|
            %li{ class: "text #{t.sent_received.downcase}" }
              %span.time= t.timestamp.in_time_zone(@timezone).strftime('%l:%M%p').downcase
              %p.message= t.message