diff options
author | wreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-08-01 20:02:21 +0000 |
---|---|---|
committer | wreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-08-01 20:02:21 +0000 |
commit | 2f4c7285eeda79854ef6fc2ebbd878e89d1d19e3 (patch) | |
tree | 580c1a0a8cbe27e1c28bcc9b764968696c864eb2 | |
parent | 07a9ef7dbcbcd2b0202b4d529602e95039a62944 (diff) | |
download | reaction-2f4c7285eeda79854ef6fc2ebbd878e89d1d19e3.tar.gz reaction-2f4c7285eeda79854ef6fc2ebbd878e89d1d19e3.zip |
reverted Role::Actions, it shouldnt ever be done
-rw-r--r-- | lib/Reaction/UI/ViewPort/Role/Actions.pm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Reaction/UI/ViewPort/Role/Actions.pm b/lib/Reaction/UI/ViewPort/Role/Actions.pm index eb8ad76..32c7bbb 100644 --- a/lib/Reaction/UI/ViewPort/Role/Actions.pm +++ b/lib/Reaction/UI/ViewPort/Role/Actions.pm @@ -5,6 +5,12 @@ use Reaction::UI::ViewPort::URI; use namespace::clean -except => [ qw(meta) ]; +has actions => ( + is => 'ro', + isa => 'ArrayRef', + lazy_build => 1 +); + has action_order => ( is => 'ro', isa => 'ArrayRef' @@ -44,17 +50,14 @@ sub _build_computed_action_order { return $ordered; } -sub actions { +sub _build_actions { my ($self) = @_; my (@act, $i); my $ctx = $self->ctx; my $loc = $self->location; my $target = $self->model; - my $valid_actions = $self->has_action_filter ? - $self->action_filter->($self->computed_action_order, $self->model) - : $self->computed_action_order; - foreach my $proto_name ( @$valid_actions ) { + foreach my $proto_name ( @{ $self->computed_action_order } ) { my $proto = $self->action_prototypes->{$proto_name}; my $uri = $proto->{uri} or confess('uri is required in prototype action'); my $label = exists $proto->{label} ? $proto->{label} : $proto_name; |