Reputation: 1305
ActiveRecord::AssociationTypeMismatch in ConversationsController#create
Notification(#105166720) expected, got Message(#103122560)
I have used the Mailboxer gem for email system as internal users communication.
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."
end
Sometimes I am getting the above error while composing new email. I couldn't find error where it has been raising..
I would be appreciate If any one share knowledge on this.
Upvotes: 2
Views: 269
Reputation: 14874
Same here and I've create a Github issue: https://github.com/mailboxer/mailboxer/issues/322
Upvotes: 1