summaryrefslogtreecommitdiff
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-27 22:52:50 +0200
commit9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch)
tree8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /app/helpers/application_helper.rb
parent85a01e35274b8d4d4165a7b26bd7986e211246bb (diff)
parent1853082fcd8c067390c246f9daa01a9b47387497 (diff)
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 22a7940..0be66e9 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1,3 +1,14 @@
1# Methods added to this helper will be available to all templates in the application. 1# Methods added to this helper will be available to all templates in the application.
2module ApplicationHelper 2module ApplicationHelper
3 def form_error_messages(form_object)
4 object = form_object.is_a?(ActionView::Helpers::FormBuilder) ? form_object.object : form_object
5 return "" unless object && object.errors.any?
6 content_tag(:div, :class => "error_messages") do
7 content_tag(:ul) do
8 object.errors.full_messages.map do |msg|
9 content_tag(:li, msg)
10 end.join.html_safe
11 end
12 end
13 end
3end 14end