aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Contact.pm
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2013-09-10 14:31:17 +0100
committerEdmund von der Burg <evdb@mysociety.org>2013-09-10 14:31:17 +0100
commit0f0c8e92fa4930a6a951b856bf86e8bbf322a008 (patch)
treebc70707864b8bbafd444023d38dff4ed52b76249 /perllib/FixMyStreet/DB/Result/Contact.pm
parentaffebc1ce59e850ccc50013bdcccc89c6846c89a (diff)
Use RABXColumn in remaining models that serialize some columns
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Contact.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Contact.pm22
1 files changed, 2 insertions, 20 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Contact.pm b/perllib/FixMyStreet/DB/Result/Contact.pm
index 551bcd019..5cbf335f1 100644
--- a/perllib/FixMyStreet/DB/Result/Contact.pm
+++ b/perllib/FixMyStreet/DB/Result/Contact.pm
@@ -60,25 +60,7 @@ __PACKAGE__->belongs_to(
# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-12-13 12:34:33
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:imXq3EtrC0FrQwj+E2xfBw
-__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');
1;