zaid/thyracker

View on GitHub
app/views/shared/_error_messages.html.haml

Summary

Maintainability
Test Coverage
- if object.errors.any?
  #error_explanation
    %h4 
      = pluralize(object.errors.count, "error")
      prohibited this 
      = object.class.to_s.underscore.humanize.downcase
      from being saved:
      %p There were problems with the following fields:
      %ul
        - object.errors.full_messages.each do |message|
          %li= message