From af2018fb5d53279a0662fc9791afba2a28da90e9 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Mon, 12 Sep 2016 10:42:31 +0200 Subject: [PATCH] ActionController::Parameter is no longer a hash Thus, we need to cast ourselves --- app/controllers/messages_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index bd8b63bf69..cbad06097c 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -77,7 +77,7 @@ class MessagesController < ApplicationController @message.attributes = permitted_params.message(@message) - @message.attach_files(permitted_params.attachments) + @message.attach_files(permitted_params.attachments.to_h) if @message.save call_hook(:controller_messages_new_after_save, params: params, message: @message) @@ -118,7 +118,7 @@ class MessagesController < ApplicationController @message.attributes = permitted_params.message(@message) - @message.attach_files(permitted_params.attachments) + @message.attach_files(permitted_params.attachments.to_h) if @message.save flash[:notice] = l(:notice_successful_update)