Don't wrap form labels

This commit is contained in:
cryptogopher 2024-01-22 02:35:14 +01:00
parent c1643030a2
commit 13c1d5684b

View File

@ -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 ")}} :