From 8a7e96aae873ffcc3868ab6c460deff3f627ca19 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 4 Jun 2014 20:38:33 +0800 Subject: [PATCH] added total_pages for frontend pagination --- app/controllers/announcements_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index a23bf6d..59918f0 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -14,7 +14,8 @@ class AnnouncementsController < ApplicationController end { "announcements" => anns, - "extras" => {"widget-title"=>"Announcements"} + "extras" => {"widget-title"=>"Announcements"}, + "total_pages" => announcements.total_pages } end