diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index a2d7ed025..db2eceda3 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -9,6 +9,7 @@ use Encode; use JSON::MaybeXS; use Utils; use Try::Tiny; +use Text::CSV; =head1 NAME @@ -230,6 +231,10 @@ sub check_and_stash_category : Private { my $all_areas = $c->stash->{all_areas}; my @bodies = $c->model('DB::Body')->active->for_areas(keys %$all_areas)->all; my %bodies = map { $_->id => $_ } @bodies; + my @list_of_names = map { $_->name } values %bodies; + my $csv = Text::CSV->new(); + $csv->combine(@list_of_names); + $c->{stash}->{list_of_names_as_string} = $csv->string; my @categories = $c->model('DB::Contact')->not_deleted->search( { |