有时候得到ActiveRecord :: AssociationTypeMismatch错误

时间:2013-08-29 05:43:37

标签: ruby-on-rails ruby mailer mailboxer

ConversationsController中的ActiveRecord :: AssociationTypeMismatch #create

预期通知(#105166720),得到消息(#103122560)

我已将Mailboxer gem用于电子邮件系统作为内部用户通信。

def create

recipient_emails = conversation_params(:recipients).split(',')
recipients = User.where(email: recipient_emails).all

conversation = current_user.
  send_message(recipients, *conversation_params(:body, :subject)).conversation

redirect_to request.referer.gsub("user=",""), notice: "Your message has been sent."

有时我在撰写新电子邮件时遇到上述错误。我无法找到错误的地方......

如果有人分享这方面的知识,我将不胜感激。

1 个答案:

答案 0 :(得分:1)

同样在这里,我创建了一个Github问题:https://github.com/mailboxer/mailboxer/issues/322