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