lib/htmltoword/action_controller.rb in htmltoword-0.5 vs lib/htmltoword/action_controller.rb in htmltoword-0.5.1

- old
+ new

@@ -4,10 +4,10 @@ unless defined? Mime::DOCX Mime::Type.register 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', :docx 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 if filename =~ %r{^([^\/]+)/(.+)$} options[:prefixes] ||= []