diff options
author | Louise Crow <louise.crow@gmail.com> | 2014-03-04 10:46:46 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-03-04 10:46:46 +0000 |
commit | ede46dc8dc6c97cdad8c3fcb3bd42ede5c25f395 (patch) | |
tree | 44e03358c9fa7ca6826e631d1d3d6c1030b1b0d5 /app/controllers/info_request_batch_controller.rb | |
parent | 8e911d5bd0e60a0e0e4859868662cc176419d2e3 (diff) | |
parent | a38b2989aebf8d554b7287e18528bed8c9e67d3b (diff) |
Merge branch 'release/0.17'0.17
Diffstat (limited to 'app/controllers/info_request_batch_controller.rb')
-rw-r--r-- | app/controllers/info_request_batch_controller.rb | 16 |
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 |