ActionController::Parameter is no longer a hash

Thus, we need to cast ourselves
pull/4862/head
Jens Ulferts 8 years ago
parent bafaab4d7b
commit af2018fb5d
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 4
      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)

Loading…
Cancel
Save