From: Marcus Ramberg Date: Tue, 7 Dec 2004 17:22:42 +0000 (+0000) Subject: Fix to check that a has_a points to another Model object. X-Git-Tag: 2.10~61 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ce6a9545f5fd2fde3490b7172193d31a8ceece2f;p=maypole.git Fix to check that a has_a points to another Model object. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@303 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/templates/factory/macros b/templates/factory/macros index e7396d3..4a90e17 100644 --- a/templates/factory/macros +++ b/templates/factory/macros @@ -34,7 +34,7 @@ command for that object. Otherwise, it just displays the data. [% MACRO maybe_link_view(object) BLOCK; - IF object.table; # It's an object, i.e. a has-a + IF object.isa('Maypole::Model::Base'); link(object.table, "view", object.id.join('/'), object); ELSE; object;