fuck
This commit is contained in:
parent
b034986e43
commit
2b4b9f31b9
|
@ -12,7 +12,6 @@ class Exporter
|
||||||
end
|
end
|
||||||
|
|
||||||
def export
|
def export
|
||||||
fail "An export is already in progress." if @user.export_processing
|
|
||||||
@user.export_processing = true
|
@user.export_processing = true
|
||||||
@user.save validate: false
|
@user.save validate: false
|
||||||
collect_user_info
|
collect_user_info
|
||||||
|
@ -128,12 +127,12 @@ class Exporter
|
||||||
|
|
||||||
qobj = {}
|
qobj = {}
|
||||||
%i(answer_count author_is_anonymous content created_at id).each do |f|
|
%i(answer_count author_is_anonymous content created_at id).each do |f|
|
||||||
qobj[f] = q.send f
|
qobj[f] = question.send f
|
||||||
end
|
end
|
||||||
|
|
||||||
if opts[:include_answers]
|
if opts[:include_answers]
|
||||||
qobj[:answers] = []
|
qobj[:answers] = []
|
||||||
qobj.answers.each do |a|
|
question.answers.each do |a|
|
||||||
qobj[:answers] << process_answer(a, include_question: false)
|
qobj[:answers] << process_answer(a, include_question: false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue