Skip to content

Commit

Permalink
nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Bob committed Nov 12, 2024
1 parent 62073c2 commit 78977a7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
data-association-class="<%= @field&.target_resource&.model_class || nil %>"
>
<%= field_wrapper **field_wrapper_args, label_for: @field.polymorphic_form_field_label, help: @field.polymorphic_help || '' do %>
<%= @form.select @field.type_input_foreign_key, options_for_select(@field.types.map { |type| [type, type] }, @field.value.type),
<%= @form.select @field.type_input_foreign_key, options_for_select(@field.types.map { |type| [type, type] }, @field.value.try(:type)),
{
include_blank: @field.placeholder,
},
Expand Down

0 comments on commit 78977a7

Please sign in to comment.