sync message

dev_hjm
jingquan huang 6 years ago
parent 51fb3db2e3
commit 4f9d645ec5

@ -26,8 +26,9 @@ namespace :sync do
if discusses.present?
discusses.find_each do |discuss|
puts discuss.user_id
puts discuss.content
new_message = Message.create!(board: board_id, author: discuss.user_id)
puts board_id
puts message_id
new_message = Message.create!(board: board_id.to_i, author: discuss.user_id)
MessageDetail.create!(message_id: new_message.id, content: discuss.try(:content))
end
end

Loading…
Cancel
Save