Инициалиазация репозитория

This commit is contained in:
ada
2025-11-11 08:24:49 +03:00
commit 39f93667fe
114 changed files with 5137 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance_tag|
fragment = Nokogiri::HTML.fragment(html_tag)
field = fragment.at('input,select,textarea')
html = if field
error_message = instance_tag.error_message.join(', ')
field['class'] = "#{field['class']}"
html = <<-HTML
<div class="field_with_errors">
#{fragment.to_s}
<p class="error-message">#{error_message.upcase_first}</p>
</div>
HTML
html
else
html_tag
end
html.html_safe
end