Actualizar plugin Questions a 1.0.2 light
This commit is contained in:
parent
b9e569d03f
commit
b37d1305f1
64 changed files with 394 additions and 229 deletions
|
@ -38,13 +38,13 @@ END_DESC
|
|||
next
|
||||
end
|
||||
|
||||
question_attrs = topic.attributes.slice('subject', 'content', 'author_id', 'locked').merge('project_id' => project.try(:id))
|
||||
question_attrs = topic.attributes.slice('subject', 'content', 'author_id', 'locked')
|
||||
migrated_question = section.questions.create(question_attrs)
|
||||
migrated_question.attachments = topic.attachments.map { |attachment| attachment.copy }
|
||||
|
||||
topic.children.each do |reply|
|
||||
if section.section_type == 'questions'
|
||||
answer_attrs = reply.slice('subject', 'content', 'author_id', 'locked').merge('project_id' => project.try(:id))
|
||||
answer_attrs = reply.slice('subject', 'content', 'author_id', 'locked')
|
||||
migrated_answer = migrated_question.answers.create(answer_attrs)
|
||||
migrated_answer.attachments = reply.attachments.map { |attachment| attachment.copy }
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue