diff --git a/app/views/fields/enum/_index.html.erb b/app/views/fields/enum/_index.html.erb index 1d68d02..d72d65b 100755 --- a/app/views/fields/enum/_index.html.erb +++ b/app/views/fields/enum/_index.html.erb @@ -14,4 +14,6 @@ By default, the attribute is rendered as a text tag. %> -<%= I18n.t("activerecord.attributes.#{field.resource.class.name.underscore}.#{field.attribute.to_s.pluralize}.#{field.data}", default: field.to_s) %> +<% if field.data %> + <%= I18n.t("activerecord.attributes.#{field.resource.class.name.underscore}.#{field.attribute.to_s.pluralize}.#{field.data}", default: field.to_s) %> +<% end %> diff --git a/app/views/fields/enum/_show.html.erb b/app/views/fields/enum/_show.html.erb index 3bcbd1d..f4ac608 100755 --- a/app/views/fields/enum/_show.html.erb +++ b/app/views/fields/enum/_show.html.erb @@ -14,4 +14,6 @@ By default, the attribute is rendered as a text tag. %> -<%= I18n.t("activerecord.attributes.#{field.resource.class.name.underscore}.#{field.attribute.to_s.pluralize}.#{field.data}", default: field.to_s) %> +<% if field.data %> + <%= I18n.t("activerecord.attributes.#{field.resource.class.name.underscore}.#{field.attribute.to_s.pluralize}.#{field.data}", default: field.to_s) %> +<% end %>