... and make the specs actually pass

This commit is contained in:
Jonne Haß 2013-06-27 18:07:26 +02:00
parent 94207e844c
commit a6dfdf45e4

View file

@ -34,7 +34,7 @@ class ConversationsController < ApplicationController
person_ids = Contact.where(:id => params[:contact_ids].split(',')).map(&:person_id)
end
params[:conversation][:participant_ids] = person_ids | [current_user.person_id]
params[:conversation][:participant_ids] = [*person_ids] | [current_user.person_id]
params[:conversation][:author] = current_user.person
message_text = params[:conversation].delete(:text)
params[:conversation][:messages_attributes] = [ {:author => current_user.person, :text => message_text }]