Torch.TableView.table_assoc_display_name
You're seeing just the function
table_assoc_display_name
, go back to Torch.TableView module for more information.
Specs
Prettifies and associated struct for display.
Displays the model's name or "None", rather than the struct's ID.
Examples
iex> table_assoc_display_name(%{category_id: 1}, :category_id, [{"Articles", 1}])
"Articles"
iex> table_assoc_display_name(%{category_id: nil}, :category_id, [{"Articles", 1}])
"None"