aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-08-01 02:15:30 +0000
committerwreis <wreis@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7>2009-08-01 02:15:30 +0000
commita36b6256ca273526c57e50837f615256b0a1354c (patch)
tree37597d67cea51dc2c626121f2f3aae9a44943719
parentc504eee41d69902130770b70602b522607324160 (diff)
parent0caf173ef392e2b60ac2587a2d1c1f9cdfe919ed (diff)
downloadreaction-a36b6256ca273526c57e50837f615256b0a1354c.tar.gz
reaction-a36b6256ca273526c57e50837f615256b0a1354c.zip
r4455@www43 (orig r1190): wallacer | 2009-07-31 20:16:27 -0500
removing cache for computed_action_order r4456@www43 (orig r1191): wallacer | 2009-07-31 20:16:38 -0500 fix for action_filter
-rw-r--r--lib/Reaction/UI/ViewPort/Role/Actions.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Reaction/UI/ViewPort/Role/Actions.pm b/lib/Reaction/UI/ViewPort/Role/Actions.pm
index ebd2d3c..32c7bbb 100644
--- a/lib/Reaction/UI/ViewPort/Role/Actions.pm
+++ b/lib/Reaction/UI/ViewPort/Role/Actions.pm
@@ -33,14 +33,21 @@ has computed_action_order => (
lazy_build => 1
);
+sub _filter_action_list {
+ my $self = shift;
+ my $actions = [keys %{$self->action_prototypes}];
+ return $self->has_action_filter ?
+ $self->action_filter->($actions, $self->model)
+ : $actions;
+}
+
sub _build_computed_action_order {
my $self = shift;
my $ordered = $self->sort_by_spec(
($self->has_action_order ? $self->action_order : []),
- [ keys %{ $self->action_prototypes } ]
+ $self->_filter_action_list
);
- return $self->has_action_filter ?
- $self->action_filter->($ordered, $self->model) : $ordered;
+ return $ordered;
}
sub _build_actions {