Guest User

Untitled

a guest
Oct 23rd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. sub insert {
  2. my $self = shift;
  3.  
  4. my $ret = $self->next::method(@_);
  5.  
  6. $self->update_search_summary;
  7.  
  8. return $ret;
  9. }
  10.  
  11. sub update {
  12. my $self = shift;
  13.  
  14. my $args = $_[0] // {};
  15. my %data = ($self->get_dirty_columns, %$args);
  16.  
  17. my $ret = $self->next::method(@_);
  18.  
  19. delete $data{search_summary};
  20. $self->update_search_summary if %data;
  21.  
  22. return $ret;
  23. }
Add Comment
Please, Sign In to add comment