Created
March 9, 2015 17:52
-
-
Save ichesnokov/1d4236f79c69fd14ebbe to your computer and use it in GitHub Desktop.
Subclassed resultset with overridden search_rs()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wrapper to exclude services with 'deleted' status from search | |
sub search_rs { | |
my $self = shift; | |
my $next_method = $self->next::can('search_rs'); | |
my $status_alias = $self->current_source_alias . '.status'; | |
return $self->$next_method(@_) | |
->$next_method({ $status_alias => { '!=' => 'deleted' } }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment