Torch v1.0.0-rc.2 Torch.TableView
Helpers for rendering Torch-generated tables.
Summary
Functions
Prettifies and associated model for display.
Displays the model’s name or “None”, rather than the model’s ID.
Example
# If post.category_id was 1
table_assoc_display_name(post, :category_id, [{"Articles", 1}])
# => "Articles"
# If post.category_id was nil
table_assoc_display_name(post, :category_id, [{"Articles", 1}])
# => "None"