Re: [Maypole] bug in macros.tt?

From: David Baird (dave at riverside-cms.co.uk)
Date: Tue Dec 07 2004 - 17:35:52 GMT


Marcus Ramberg wrote:
>
> On 7. des. 2004, at 18.04, Dave Howorth wrote:
>
>> I think there's a bug in the maybe_link_view macro.
>>
>> It produces HTML links from fields that are foreign keys to rows in
>> related tables, but is a bit overzealous. It divides fields into two
>> categories, 'objects' and 'non-objects' and it assumes that every
>> object can only be a foreign key. But this isn't true, it could just
>> be a field with an inflated value (such as Time::Piece).
>>
>> Its means of determining whether something is an object is to invoke
>> the thing's 'table' method. This doesn't do the right thing on
>> arbitrary objects :) I suggest instead testing whether the thing
>> inherits from Maypole::Model::Base and this appears to work for me.
>> Here's a patch:
>
>
> This makes sense, I've applied this patch.

Ditto for the MasonX::Maypole template.

d.

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT