aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/info_request_batch_controller.rb
diff options
context:
space:
mode:
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