woese/guara-crm

View on GitHub
app/helpers/form_ajax_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage

module FormAjaxHelper
  
  def format_errors(plural_model_name, errors)
    Hash[errors.map { |k,v| [ I18n.translate("%s.%s" % [plural_model_name, k]), v ] }]
  end
  
end