Skip to content

Commit

Permalink
consider human attribute name for labels
Browse files Browse the repository at this point in the history
  • Loading branch information
koenpunt authored and donv committed Apr 29, 2022
1 parent cce1cea commit 7861e5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bootstrap_form/components/labels.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def label_text(name, options)
if label_errors && error?(name)
(options[:text] || object.class.human_attribute_name(name)).to_s.concat(" #{get_error_messages(name)}")
else
options[:text]
options[:text] || object.class.human_attribute_name(name)
end
end
end
Expand Down

0 comments on commit 7861e5a

Please sign in to comment.