From b1d378fd07af68af54cf7b0018206a6096b3a8a1 Mon Sep 17 00:00:00 2001 From: Cyril Duez Date: Wed, 14 Oct 2015 17:48:36 +0200 Subject: [PATCH] Append docx to formats instead of overwriting the first entry. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cyril Duez Signed-off-by: François de Metz --- lib/htmltoword/action_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/htmltoword/action_controller.rb b/lib/htmltoword/action_controller.rb index be72f63..ef3e8c9 100644 --- a/lib/htmltoword/action_controller.rb +++ b/lib/htmltoword/action_controller.rb @@ -6,7 +6,7 @@ end ActionController::Renderers.add :docx do |filename, options| - formats[0] = :docx unless formats.include?(:docx) || Rails.version < '3.2' + formats << :docx unless formats.include?(:docx) || Rails.version < '3.2' # This is ugly and should be solved with regular file utils if options[:template] == action_name