diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2013-09-10 14:31:17 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2013-09-10 14:31:17 +0100 |
commit | 0f0c8e92fa4930a6a951b856bf86e8bbf322a008 (patch) | |
tree | bc70707864b8bbafd444023d38dff4ed52b76249 /perllib/FixMyStreet/DB/Result/Comment.pm | |
parent | affebc1ce59e850ccc50013bdcccc89c6846c89a (diff) |
Use RABXColumn in remaining models that serialize some columns
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index c747f7fc1..d1626599e 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -85,32 +85,13 @@ __PACKAGE__->belongs_to( # Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-07-11 18:53:26 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tSejJzLxHD/fMWjpa10lfA -__PACKAGE__->filter_column( - extra => { - filter_from_storage => sub { - my $self = shift; - my $ser = shift; - return undef unless defined $ser; - utf8::encode($ser) if utf8::is_utf8($ser); - my $h = new IO::String($ser); - return RABX::wire_rd($h); - }, - filter_to_storage => sub { - my $self = shift; - my $data = shift; - my $ser = ''; - my $h = new IO::String($ser); - RABX::wire_wr( $data, $h ); - return $ser; - }, - } -); +__PACKAGE__->load_components("+FixMyStreet::DB::RABXColumn"); +__PACKAGE__->rabx_column('extra'); use DateTime::TimeZone; use Image::Size; use Moose; use namespace::clean -except => [ 'meta' ]; -use RABX; with 'FixMyStreet::Roles::Abuser'; |