From 13c1d5684b75c4e00f7041735989aeb951f32809 Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Mon, 22 Jan 2024 02:35:14 +0100 Subject: [PATCH] Don't wrap form labels --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2afaaae..396a6f1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -29,7 +29,7 @@ module ApplicationHelper def labelled_row_for(method, options) @template.content_tag :tr do - @template.content_tag(:td, label_for(method, options)) + + @template.content_tag(:td, label_for(method, options), class: "unwrappable") + @template.content_tag(:td, options.delete(:readonly) ? @object.public_send(method) : yield, @object&.errors[method].present? ? {class: "error", data: {content: @object&.errors.delete(method).join(" and ")}} :