You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a link to dash_if_blank documentation page on the custom fields page. When defining a custom field like field :map, as: :my_map_custom_field, and the model lacks a map attribute (for instance, using separate latitude and longitude fields instead), the component renders a dash because no value exists for map.
This behavior can be confusing if not clearly documented, as users might not expect a dash to appear in place whatever he does on the component.
This renders a dash:
<%= field_wrapper **field_wrapper_args do %>
hello
<% end %>
This renders "hello"
<%= field_wrapper **field_wrapper_args, dash_if_blank: false do %>
hello
<% end %>
The text was updated successfully, but these errors were encountered:
Add a link to
dash_if_blank
documentation page on the custom fields page. When defining a custom field likefield :map, as: :my_map_custom_field
, and the model lacks amap
attribute (for instance, using separatelatitude
andlongitude
fields instead), the component renders a dash because no value exists formap
.This behavior can be confusing if not clearly documented, as users might not expect a dash to appear in place whatever he does on the component.
This renders a dash:
This renders "hello"
The text was updated successfully, but these errors were encountered: