aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/info_request_batch_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-03-04 09:53:26 +0000
committerLouise Crow <louise.crow@gmail.com>2014-03-04 09:53:26 +0000
commit3912c73583464e3ff203e3e101325ccabcba0506 (patch)
tree3b57620358c4c4cfe1c52702f2979876f6452aa0 /app/controllers/info_request_batch_controller.rb
parent2a49615ee3ea08f7952283efc0306a1ac0c23334 (diff)
parentaf83354da1030c2d2fad3c63f3ccb516c4923d38 (diff)
Merge branch 'release/0.17' into wdtk
Conflicts: config/general.yml-example
Diffstat (limited to 'app/controllers/info_request_batch_controller.rb')
-rw-r--r--app/controllers/info_request_batch_controller.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/info_request_batch_controller.rb b/app/controllers/info_request_batch_controller.rb
new file mode 100644
index 000000000..b66658757
--- /dev/null
+++ b/app/controllers/info_request_batch_controller.rb
@@ -0,0 +1,16 @@
+class InfoRequestBatchController < ApplicationController
+
+ def show
+ @info_request_batch = InfoRequestBatch.find(params[:id])
+ @per_page = 25
+ @page = get_search_page_from_params
+ if @info_request_batch.sent_at
+ @info_requests = @info_request_batch.info_requests.visible.all(:offset => (@page - 1) * @per_page,
+ :limit => @per_page)
+ else
+ @public_bodies = @info_request_batch.public_bodies.all(:offset => (@page - 1) * @per_page,
+ :limit => @per_page)
+ end
+ end
+
+end