aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Around.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-02-23 11:56:37 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-02-23 11:57:31 +0000
commita3b774254a987c767dae890ed076e685dff4c561 (patch)
tree5bf352d875ffcca2d251dc816f5e6326b21c93da /perllib/FixMyStreet/App/Controller/Around.pm
parenta20baf15cabeaf50b6d9e5632e59cd44f18976bc (diff)
Factor out fragment rendering, as additional template paths needs to be passed.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Around.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index 148a22368..ac8e0e719 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -258,12 +258,11 @@ sub ajax : Path('/ajax') {
FixMyStreet::Map::map_pins( $c, $interval );
# render templates to get the html
- my $on_map_list_html =
- $c->view('Web')
- ->render( $c, 'around/on_map_list_items.html', { on_map => $on_map } );
-
- my $around_map_list_html = $c->view('Web')->render(
- $c,
+ my $on_map_list_html = $c->render_fragment(
+ 'around/on_map_list_items.html',
+ { on_map => $on_map }
+ );
+ my $around_map_list_html = $c->render_fragment(
'around/around_map_list_items.html',
{ around_map => $around_map, dist => $dist }
);