<%doc>

=head2 view_related

This takes an object, and looks up the C<related_accessors>; this should
give a list of accessors that can be called to get a list of related
objects. It then displays a title for that accessor, (i.e. "Beers" for a
brewery) calls the accesor, and displays a list of the results.

=cut

</%doc>
<%args>
    $object
</%args>

% foreach my $accessor ( $request->model_class->related( $request ) ) {
<h3><% ucfirst( $accessor ) %></h3>
<ul id="vlist">
% foreach my $thing ( $object->$accessor ) {
<li><% $request->maybe_link_view( $thing ) %></li>
% }
</ul>
% }
