diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-11-27 17:44:35 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-12-04 09:32:45 +0000 |
commit | e95b95e78891e2c0e7e0307464637b38ed8b5a4d (patch) | |
tree | 654d19c6b8f2731df6564267c828280a203faf01 /app/controllers/info_request_batch_controller.rb | |
parent | e55d7850d36b147275c2f8ffcacccbcf97e0a1d5 (diff) |
Update notices for offline sending.
Diffstat (limited to 'app/controllers/info_request_batch_controller.rb')
-rw-r--r-- | app/controllers/info_request_batch_controller.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/info_request_batch_controller.rb b/app/controllers/info_request_batch_controller.rb index f76f7abc2..b66658757 100644 --- a/app/controllers/info_request_batch_controller.rb +++ b/app/controllers/info_request_batch_controller.rb @@ -4,8 +4,13 @@ class InfoRequestBatchController < ApplicationController @info_request_batch = InfoRequestBatch.find(params[:id]) @per_page = 25 @page = get_search_page_from_params - @info_requests = @info_request_batch.info_requests.all(:offset => (@page - 1) * @per_page, - :limit => @per_page) + 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 |