[jifty-devel] upgrade 0.711290->0.804080 & refers_to column disappears from Create form

Peter Mottram peter at sysnix.com
Tue Apr 15 06:58:40 EDT 2008


On Mon, 14 Apr 2008, Peter Mottram wrote:
> On Mon, 14 Apr 2008, Jesse Vincent wrote:
>> On Apr 14, 2008, at 7:24 AM, Peter Mottram wrote:
>>> Thought I'd test out 0.804080 from CPAN and have lost a column from
>>> default create form.
>>>
>>> Two simple models demonstrate this...
>>>
>>
>> The code below sure _looks_ at least close to right. Are you up for whipping
>> up a small test app that we can drop into the Jifty test suite to triage the
>> bug and make sure it never happens again?
>
>
> I'll see what I can sort. It's about time I got round to writing some
> tests for my real app anyway. :-)


Attached test app runs fine on 0.711290 but fails 2 tests on 0.804080 and 
trunk.

When I get chance I'll start to have a dig around to see if I can find the 
problem. Don't expect any results too soon as I'm not familiar with much 
of Jifty's internals.


>>> package MyApp::Model::Foo;
>>> use Jifty::DBI::Schema;
>>>
>>> use MyApp::Record schema {
>>>
>>>    column one =>
>>>        type is 'text';
>>>
>>>    column two =>
>>>        references MyApp::Model::BarCollection by 'alpha',
>>>        render_as 'Select',
>>>        valid_values are defer {
>>>            my $bars = MyApp::Model::BarCollection->new();
>>>            $bars->unlimit;
>>>            [{
>>>                display_from => 'alpha',
>>>                value_from   => 'id',
>>>                collection   => $bars,
>>>            }];
>>>        };
>>> };
>>>
>>>
>>> package MyApp::Model::Bar;
>>> use Jifty::DBI::Schema;
>>>
>>> use MyApp::Record schema {
>>>
>>>    column alpha => type is 'text';
>>> };
>>>
>>>
>>> Having added a couple of rows to Bar I expect to be handed a shiny select
>>> widget for column two containing the values from Bar. This is indeed the
>>> behaviour in 0.711290 but using 0.804080 there is no select widget and no
>>> errors in my server console.
>>>
>>> Is there a new method for doing this that I need to use?
>>>
>>> R.
>>> PeteM
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testapp.tgz
Type: application/x-gtar
Size: 2161 bytes
Desc: 
Url : http://lists.jifty.org/pipermail/jifty-devel/attachments/20080415/573c8e1e/attachment.tgz 


More information about the jifty-devel mailing list