diff --git a/lib/dough/forms/builders/validation.rb b/lib/dough/forms/builders/validation.rb index 277a2f2c..9b69314f 100644 --- a/lib/dough/forms/builders/validation.rb +++ b/lib/dough/forms/builders/validation.rb @@ -10,14 +10,22 @@ module ValidationModule include ActionView::Helpers::TranslationHelper def validation_summary - ApplicationController.render(partial: 'dough/forms/builders/validation/summary_for_errors', locals: { errors: errors, error_prefix: error_prefix }) + ApplicationController.render( + partial: 'dough/forms/builders/validation/summary_for_errors', + locals: { errors: errors, error_prefix: error_prefix } + ) end def errors_for(subject = nil, field) subject ||= object filtered_errors = errors.select { |hash| hash[:object] == subject && hash[:field] == field } - ApplicationController.render(partial: 'dough/forms/builders/validation/errors_for_field', collection: filtered_errors, as: 'error', locals: { error_prefix: error_prefix }) + ApplicationController.render( + partial: 'dough/forms/builders/validation/errors_for_field', + collection: filtered_errors, + as: 'error', + locals: { error_prefix: error_prefix } + ) end def validates(*models)