File obs-server-2.10-0119-Pass-the-view-paths-as-array-to-ActionView-Base.new.patch of Package obs-server

From a1c42297d2b3a6d175846710ce2ffee7659b05be Mon Sep 17 00:00:00 2001
From: Stephan Kulow <coolo@suse.de>
Date: Sat, 23 Nov 2019 09:18:06 +0100
Subject: [PATCH] Pass the view paths as array to ActionView::Base.new

Rails 6 can't handle Rails::Root::Path itself
---
 src/api/app/mixins/can_render_model.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api/app/mixins/can_render_model.rb b/src/api/app/mixins/can_render_model.rb
index 400329b7c2..ffc94223d1 100644
--- a/src/api/app/mixins/can_render_model.rb
+++ b/src/api/app/mixins/can_render_model.rb
@@ -3,7 +3,7 @@
 # and use my_model to access the model instead of self
 module CanRenderModel
   def render_xml(locals = {})
-    action_view = ActionView::Base.new(Rails.configuration.paths['app/views'])
+    action_view = ActionView::Base.new(Rails.configuration.paths['app/views'].to_ary)
     locals[:my_model] = self
     action_view.render partial: "models/#{self.class.name.underscore}", formats: [:xml],
                        locals: locals
-- 
2.31.1