store multiple submitter results

This commit is contained in:
Alex Turchyn
2023-06-13 00:29:07 +03:00
parent 279409ad41
commit 28429c1167
36 changed files with 391 additions and 241 deletions
+7 -1
View File
@@ -10,10 +10,16 @@ ActionView::Base.field_error_proc = proc do |html_tag, instance|
parsed_html_tag = Nokogiri::HTML::DocumentFragment.parse(html_tag)
parsed_html_tag.children.add_class 'input-error'
# rubocop:disable Rails/OutputSafety
html_tag = parsed_html_tag.to_s.html_safe
# rubocop:enable Rails/OutputSafety
result = html_tag
result += ApplicationController.helpers.tag.label(ApplicationController.render(partial: 'shared/field_error', locals: { message: "#{field_name} #{errors}" }), class: 'label') if errors.present?
if errors.present?
result +=
ApplicationController.render(partial: 'shared/field_error', locals: { message: "#{field_name} #{errors}" })
end
result
end