diff options
author | Dave Arter <davea@mysociety.org> | 2017-08-17 13:28:47 +0100 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-08-17 13:28:47 +0100 |
commit | adfbe1c2ef9335e86e4f177db2eb2adfa6249e52 (patch) | |
tree | c110c92155be4cfeadd91d1d663df0684c341929 /perllib/FixMyStreet/DB/ResultSet/ReportExtraFields.pm | |
parent | dd1cefa2d7751d3c7fb8ca4f3cb2f35efc2a8fd5 (diff) | |
parent | fb03c300258b5d1dc419d7d08ecb3afa12a2fa5b (diff) |
Merge branch '1743-report-extras-editing'
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/ReportExtraFields.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/ReportExtraFields.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/ReportExtraFields.pm b/perllib/FixMyStreet/DB/ResultSet/ReportExtraFields.pm new file mode 100644 index 000000000..1348df3c2 --- /dev/null +++ b/perllib/FixMyStreet/DB/ResultSet/ReportExtraFields.pm @@ -0,0 +1,25 @@ +package FixMyStreet::DB::ResultSet::ReportExtraFields; +use base 'DBIx::Class::ResultSet'; + +use strict; +use warnings; + +sub for_cobrand { + my ( $rs, $cobrand ) = @_; + + my $result = $rs->search( + { cobrand => [ undef, $cobrand->moniker, '' ] } + ); + return $result; +} + +sub for_language { + my ( $rs, $language ) = @_; + + my $result = $rs->search( + { language => [ undef, $language, '' ] } + ); + return $result; +} + +1; |