JordanHatch/maslow-redux

View on GitHub
app/views/activity_items/items/_update.html.erb

Summary

Maintainability
Test Coverage
<p class="change-summary">
  Updated <%= format_changed_fields_list(item.need_changes.keys) %>
</p>

<ul class="change-detail">
  <% item.need_changes.each do |field,(previous,current)| %>
    <li>
      <h3><%= format_field_name(field) %></h3>
      <span class="previous-value"><%= format_field_value(previous) %></span>
      <span class="to-label">to</span>
      <span class="changed-value"><%= format_field_value(current) %></span>
    </li>
  <% end %>
</ul>