Module: FormAjaxHelper

Included in:
TasksController
Defined in:
app/helpers/form_ajax_helper.rb

Instance Method Summary collapse

Instance Method Details

#format_errors(plural_model_name, errors) ⇒ Object



4
5
6
# File 'app/helpers/form_ajax_helper.rb', line 4

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