Improve performance of admin/conference/*/registrations
* Add some caching * Reduce query count, including N+1s on questions & roles
This commit is contained in:
parent
6987c34e12
commit
66ea7c077d
5 changed files with 66 additions and 65 deletions
|
|
@ -1,9 +1,5 @@
|
|||
- @conference.questions.each do |q|
|
||||
|
||||
%b Q:
|
||||
= q.title
|
||||
|
||||
%b A:
|
||||
- registration.qanswers.where(question_id: q.id).each do |qa|
|
||||
= qa.answer.title
|
||||
%br
|
||||
- cache [:admin, @conference, registration.qanswers] do
|
||||
%dl
|
||||
- registration.qanswers.each do |qa|
|
||||
%dt= qa.question.title
|
||||
%dd= qa.answer.title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue