diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-04-30 17:44:26 +0100 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-05-07 15:53:14 +0100 |
commit | 0503e342f8aa08b70f6b14c75ec5c0bf402aa813 (patch) | |
tree | ef2491d3128884ba25ad94e06ecadbbbd212e465 /spec/controllers/widgets_controller_spec.rb | |
parent | 67d69ce1f8f81f44c0099e631d0ba95fc02d9763 (diff) |
Reduce N+1 queries getting update body requests
Removes the following bullet warnings:
N+1 Query detected
PublicBodyChangeRequest => [:public_body]
Add to your finder: :includes => [:public_body]
N+1 Query method call stack
/home/vagrant/alaveteli/app/models/public_body_change_request.rb:65:in
`get_public_body_name'
/home/vagrant/alaveteli/app/views/admin_general/_change_request_summary.html
.erb:8:in
`_app_views_admin_general__change_request_summary_html_erb__490351475_701155
42681500'
/home/vagrant/alaveteli/app/views/admin_general/index.html.erb:225:in
`_app_views_admin_general_index_html_erb___48164640_70115537288900'
/home/vagrant/alaveteli/app/views/admin_general/index.html.erb:224:in
`_app_views_admin_general_index_html_erb___48164640_70115537288900'
/home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in
`record_memory'
/home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in
`call'
N+1 Query detected
PublicBodyChangeRequest => [:user]
Add to your finder: :includes => [:user]
N+1 Query method call stack
/home/vagrant/alaveteli/app/models/public_body_change_request.rb:57:in
`get_user_name'
/home/vagrant/alaveteli/app/views/admin_general/_change_request_summary.html
.erb:46:in
`_app_views_admin_general__change_request_summary_html_erb__490351475_701155
42681500'
/home/vagrant/alaveteli/app/views/admin_general/index.html.erb:225:in
`_app_views_admin_general_index_html_erb___48164640_70115537288900'
/home/vagrant/alaveteli/app/views/admin_general/index.html.erb:224:in
`_app_views_admin_general_index_html_erb___48164640_70115537288900'
/home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in
`record_memory'
/home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in
`call'
Diffstat (limited to 'spec/controllers/widgets_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions