From ec2614eba4591b0b138c87b84bef7ef1463aa5be Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Fri, 6 Jan 2012 17:04:12 +0000 Subject: Fix zip-attachment functionality --- app/controllers/request_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 8672fdf75..f3bbd6708 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -814,7 +814,8 @@ class RequestController < ApplicationController for message in info_request.incoming_messages attachments = message.get_attachments_for_display for attachment in attachments - zipfile.get_output_stream(attachment.display_filename) { |f| + filename = "#{attachment.url_part_number}_#{attachment.display_filename}" + zipfile.get_output_stream(filename) { |f| f.puts(attachment.body) } end -- cgit v1.2.3 From 766d696d5b914520b0b9367e9b9a9decab87ea5f Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Fri, 6 Jan 2012 17:14:02 +0000 Subject: now we have so many public bodies, there's not much point listing so many on one page and having massive page download sizes --- app/controllers/public_body_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 62229a441..c31134641 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -129,7 +129,7 @@ class PublicBodyController < ApplicationController end PublicBody.with_locale(@locale) do @public_bodies = PublicBody.paginate( - :order => "public_body_translations.name", :page => params[:page], :per_page => 1000, # fit all councils on one page + :order => "public_body_translations.name", :page => params[:page], :per_page => 100, :conditions => conditions, :joins => :translations ) -- cgit v1.2.3