From a0c543ee3e81e099e9a369afc5838ba9d6376bc6 Mon Sep 17 00:00:00 2001 From: Stephan Kulow 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 400329b7c2f..ffc94223d1f 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