my $self = shift;
my $url = $self->url_for(@_);
+ if ($self->delay_flash_on_redirect) {
+ require SL::Helper::Flash;
+ SL::Helper::Flash::delay_flash();
+ }
+
print $::request->{cgi}->redirect($url);
}
}
}
+#
+# behaviour. override these
+#
+
+sub delay_flash_on_redirect {
+ 0;
+}
+
#
# private functions -- for use in Base only
#
The hook's return values are discarded.
+=item delay_flash_on_redirect
+
+May be overridden by a controller. If this method returns true, redirect_to
+will delay all flash messages for the current request. Defaults to false for
+compatibility reasons.
+
=back
=head2 PRIVATE FUNCTIONS