diff options
author | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-10-31 14:15:39 +0000 |
---|---|---|
committer | edenc <edenc@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-10-31 14:15:39 +0000 |
commit | 588a35ac5c72d42a82ffff5514b4d6eebe0d0b8f (patch) | |
tree | 15c4c668135b25acbdabf47c9e8c66f9b6fcddea /lib/Reaction/UI/ViewPort/Field.pm | |
parent | 486ed16ffb700527b9cf02a3fc17d9f7ce0776e3 (diff) | |
download | reaction-588a35ac5c72d42a82ffff5514b4d6eebe0d0b8f.tar.gz reaction-588a35ac5c72d42a82ffff5514b4d6eebe0d0b8f.zip |
readded lazy checks to enable choose one defaults based on lazy_build
Diffstat (limited to 'lib/Reaction/UI/ViewPort/Field.pm')
-rw-r--r-- | lib/Reaction/UI/ViewPort/Field.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Reaction/UI/ViewPort/Field.pm b/lib/Reaction/UI/ViewPort/Field.pm index 1555f99..27bbf58 100644 --- a/lib/Reaction/UI/ViewPort/Field.pm +++ b/lib/Reaction/UI/ViewPort/Field.pm @@ -32,9 +32,13 @@ sub _model_has_value { my $predicate = $self->attribute->get_predicate_method; if (!$predicate || $self->model->$predicate - #|| ($self->attribute->is_lazy - # && !$self->attribute->is_lazy_fail) + || ($self->attribute->is_lazy + && !$self->attribute->is_lazy_fail) ) { + # edenc -- uncommented the lazy checks above + # model->$predicate returns false if the value isn't set + # but has a lazy builder + # either model attribute has a value now or can build it return 1; } |